Mozilla Hubs - Render content from API - mozilla

I am new to metaverse and need guidance on how to make API calls from an element and render say in a Troika Text element or any other element of Spoke.
All the Spoke tutorials talk about creating object and scenes and exporting them to
Mozilla Hub but I did not find any reference on how to render content from a REST API like displaying the current weather from this API https://api.open-meteo.com/v1/forecast?latitude=52.52&longitude=13.41&current_weather=true.

Related

Sharepoint Document Library OnQuickLaunch (in site navigation) with Graph API?

I'm currently working with SPO and Microsoft Graph API on a .NET 6.0 microservice.
What I want to achieve is to create a Document Library and to have a link to it in the quick navigation on the left.
I can create the Document library successfully like this:
But the created document library is only visible in the "Site Contents" section.
What the user's I'm developing for would like to have is, as simple as: EVERY TIME a new Document Library is programmatically created a link to it SHOWS up in the navigation pane.
From a user perspective this is easily achievable from the UI:
It's just a tick.
With fiddler I saw the body of the request made when you create a Document Library via UI:
But what's the corresponding property of this simple "OnQuickLaunch" field in the Graph API list model?
I've been unable to find any reference from MS documentation, am I blind or missing something?
Would also be ok if should be, somehow, possible to add the link in the navigation pane "manually" from code via Graph API.
Something like:
POST microsoft.graph.com/v1/quickLaunch/links
with body:
{
"name":"myLink",
"url":"the/document/library/url"
}

DocuSign API Set page orientation

I see in the web interface that I can rotate document pages individually inside an envelope, but I can’t seem to do it via the API.
The API offers height and width properties of a Document, but they seem to have no effect when I use them via the python client.
You'll want to call the Envelopes::rotateDocumentPage method using our Python SDK.
For example, should you want to rotate a document page within your envelope, you can do so calling that method on your envelope object, passing in the string "left" or "right" depending on which way you want to rotate the document.
Here a link to the relevant API reference page.

Twitter api doesn't send media element with timeline

So I am using the twitter node module and twitters rest api to fetch timelines.
All works well, except that attached images do not get sent with the response.
Even after I added "include_entities: true" to the options object.
I'm talking about an image directly attached to a twitter post, links get displayed just fine.
I simply can't find a way to get it to display, any help is appreciated.
Every tweet has a Media Entity attached to it. You need to find the Media Id and then get the URL from -mediaURL. The below picture shows the full object model.
PC : https://www.visual-paradigm.com/tutorials/rest-api-design-twitter-example.jsp

Retrieving files from blog media entries

The tool I'm building needs pull data from IBM Connections Ideation Blogs. I therefore use the Connections API with basic authentication to read Blog Entries. This goes well until the description contains images. When I ask the API to provide media resources for the blog, it does not show any entries of the /BLOGS_UPLOADED_IMAGES location - the one containing images uploaded through the blog's richtext editor. The user I use in my API call is the same user who created blog entries and uploaded pictures.
However the API call DOES contain images I publish using the API and a POST request to the blog's media entry collection. This is where the next problem appears. Those Atom entries for images contain various links, one of them with a ref="enclosure", of which the API documentation (link) tells me to "Use the web address in the href attribute to obtain the binary content of the file". However, my calls to this adress are always answered with 404 response code.
Another url in the Atom entry (this time of the element) is described by the same documentation (see link above) as: "Provides access the document's media. The following operation is supported: GET: Use the web address to obtain the media." When I make a call to this url, as always with basic authentication credentials attached, the response contains the html of the login form of Connections, so API authentication does not seem to be supported on this url. This is only the case for non-public communities, which require authentication, of course, if the picture is publicly availabe all works just fine.
Am I missing something out? Is there another way to retrieve the actual image from a blog's media entry through the API? Are manually uploaded pictures never contained in the media entries result or is this a bug?
It now magically works using the link with ref="enclosure" from the atom entry. I might have gotten something wrong with authentication I guess (although I'm not actually realizing what I'm doing different now than I did before).
Problem remaining: Pictures uploaded through the rich-text editor in the folder /BLOGS_UPLOADED_IMAGES do not appear in the media feed of the blog.

IBM Connections Service URL for Activity Stream

I am using the Social Business Toolkit (SBT) with the Extension Library.
Using the IBM documentation, I am struggling to find the service URL to get the updates from the activity stream (like what you see in the home page).
I am expecting to be able to do this but rather than get the users entries, get all entries that have been posted on their board/other users updates
new sbt.ConnectionsService("/profiles/atom/mv/theboard/entry/status.do?email=" +userBean.email);
Does anybody know it?
sbt.ConnectionsService is part of com.ibm.xsp.extlibx. That is different from the Social Business Toolkit SDK.
In order to read the entries from the activity stream using the SDK you can simply call ActivityStreamService.getAllUpdatesStream() or getActivityStreamEntries(String user, String group, String app, Map params) if you want to filter it.
See http://openntf.org/XSnippets.nsf/snippet.xsp?id=create-entry-in-activity-stream-from-xpages-via-the-social-sdk-and-oauth2

Resources