how do we paginate activity feed from getStream.io in flutter? - flutter

I'm new to getStream.io and i'm retrieving feed from flatfeed don't know how to paginate response in flutter.I know we pass offset and limit but how could I know to change offset value dynamically.

Paginated methods such as flatFeed.getPaginatedEnrichedActivities return a json response with a field "next". This field is something of this order:
"/api/v1.0/enrich/feed/user/sacha/?api_key=$keyField&id_lt=$idLtField&limit=$limitField"
Essentially you need to parse the URL parameters limit and id_lt in order to query the next page and so on until "next" is null.
We have simplified this process in the core package with loadMoreEnrichedActivities. In the tutorial there is an Activities Pagination section where you can read more about it

Related

How to get the record ID in field array?

Can you help me with this please? I use the IONIC 5 framework and Appery.io platform in order to build my app.
I displayed the list of data from my REST API and was able to display it in the page together with the record ID. I want to update the selected record using the record ID but I cannot get the correct value. [cid:9e3c9913-c781-4103-ac5b-e4ac7b3ca340]
In the , I want to get the value of the selected record which is 278 how can I do this?
Please read the selected item's ID on the select event https://docs.appery.io/docs/ionic-4-events-and-actions#action-arguments
It is available in the variable currentItem.itemValue

Using Azure DevOps API to get Work Item Types Field values for a field that has dynamic data based on the value of another field

I'm using the API query
GET https://dev.azure.com/{organization}/{project}/_apis/wit/workitemtypes/{type}/fields/{field}?api-version=5.1
with great success to get all of the allowed values for my fields. The issue is that the options to one of my dropdown menus is populated based on the selected value of another dropdown menu. Is it possible to pass a value to this GET query and then retrieve all of the allowedValues for this dynamically populated menu?
I'm afraid that this is currently impossible to pass a value to this GET query and then retrieve all of the allowedValues for this dynamically populated menu.
Work Item Types Field-Get rest api should only get the allowedValues of a specified field, cannot implement the logic of returning the allowedValues of this field based on the value of another field.
In addition, according to URI Parameters, you also cannot add the value of another field as optional parameters to the url for conditional filtering .
You could add your request for this feature on our UserVoice site , which is our main forum for product suggestions.After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.

Using Smartsheet API 2.0 how to get ONLY the 'modifiedAt' property of a specific sheet

I need to get the last modified timestamp property of a sheet using Smartsheet API 2.0 (preferably Python SDK).
Ref:
https://smartsheet-platform.github.io/api-docs/
https://github.com/smartsheet-platform/smartsheet-python-sdk
Using Sheets.list_sheets I am able to get the 'modifiedAt' property (along with other properties) for all the sheets that I have access to.
Using Sheets.get_sheet(sheet_id) I get all the data (rows, columns) for the specified sheet.
How do I get only the 'modifiedAt' (it's OK if some other small properties are also present) for a specific sheet with a known sheet ID. I don't want the row, column, cell information to be present in the API response.
I wrote to Smartsheet support team and their answer served my purpose.
Thanks for contacting Smartsheet Support. In order to narrow down the
response that you're getting, you can use the exclude parameter:
http://smartsheet-platform.github.io/api-docs/#query-strings. In my
testing, I excluded all rows and columns where columnIds=0 and
rowIds=0. That left me with only the Sheet information, which includes
the modifiedAt for the sheet. You may be able to limit it further, but
the result I got from this was pretty short and sweet.
(Python SDK example)
response = ss_client.Sheets.get_sheet(MY_SHEET_ID, column_ids='0', row_ids = '0')
Using the above parameters, I was able to exclude all the sheet data and got only the metadata (which included modifiedAt property).
Basically my intention was to run a sync script periodically and store the Smartsheet data into my local db. I wanted the API response to skip the actual Sheet data (rows, columns, cells) if nothing would have changed since the last execution. Another nifty way of achieving this to use the ifVersionAfter parameter.
ifVersionAfter (optional): If version specified is still the current
sheet version, then returns an abbreviated Sheet object with only the
sheet version property. Otherwise, if the sheet has been modified,
returns the complete Sheet object. Intended to allow clients with a
cached copy to make sure they have the latest version.
last_version_fetched = 7724
response = ss_client.Sheets.get_sheet(MY_SHEET_ID, if_version_after=last_version_fetched)
The Get Sheet call will always return the content (row, column, data) from a specific sheet. While there is an 'exclude' query parameter that can filter out some properties, it does not work on the primary sheet data returned from the /sheets/{sheetId} endpoint.
The Sheets.list_sheets call seems like the easier route if you only need the modifiedAt property. I would use that one then iterate over the results until you find the matching id.

Get more product field value in Algolia json data

We are using Algolia extension for Magento 2. We added 2-3 field in the products, so we want to show the value of those fields on instant search result page. As we checking the view/frontend/templates/instant/hit.phtml is in use, we want to add the custom attributes to the JSON data so we can fetch those attributes value and show in listing page.
First you have to add new fields to Algolia product index if not already added. You can use one of the custom backend events. e.g. algolia_after_create_product_object
Once your fields are indexed properly (verify from Algolia account console), you should be able to get those in hit.phtml

Post into Confluence table using REST API

Found many examples on simple API queries but nothing close to what i want.
I have my space key and page ID, this is my table
How can i append hyperlinks, and attach a file in cell 3 for each build using REST API.
get the page : add expand=body.storage as a query parameter to get the body.storage.value which holds the html tags. Then parse the get response to edit the specific value in the 's then when updating the page update the body.storage.value withing your json like in the example: https://docs.atlassian.com/atlassian-confluence/REST/latest-server/#content-update