how to create logic that returns a certain number of cards based on the output of an API - botframework

I am calling an API where i get a set of information back as an object (e.g. screenshot). Because the value “bill_number” equals 2, I then want to create some logic that means that: because 2 instances of bills have been returned from the API (bill_number == 2) the next response from the bot should be 2 hero cards (in a carousel) with each card displaying different pieces of information: Card 1 to display the values of bill number 1 and card 2 to display the values for bill number 2. Similarly, if the value of "bill_number” returned when calling the API again was 4, i want the logic to then create 4 cards. I am unable to find the logic to create this.
 (see image)
information returned from api

It sounds like you need to use dynamic adaptive card to achieve this outcome.
I did find this which appears to be looking to do something similar - https://github.com/microsoft/BotFramework-Composer/issues/3674

Related

How to retrieve last four card digits after successfull transaction using Square Point of Sale API?

I'm trying to use Square Point Of Sale API in my android app to deal with card payments utilizing square hardware. In order to generate valid customer receipt in my android app, I need to retrieve some information from Square about the card that was used to complete the transaction (such as four last digits).
I've tried to see what data com.squareup.sdk.pos.ChargeRequest.Success object returns, but as I understand - it only returns transactions ID's and metadata that was passed from my app to begin with.
Any ideas how can I solve this problem?
Thanks.
You would use the transactionId that is returned to you to pass it along to the BatchRetrieveOrders API endpoint (transaction_id == order_id), in order to find more information about the transaction including the last 4 digits of the card used. The last 4 would be available via Order->tenders[0]->card_details->card->last_4.

Need a Barcode Scanning device that call Rest Api Method

I need a Barcode Scanning Device that reads code of an item and make callback to Rest Api Methods that i configure.
Any one have idea about it ?
Scenario:
The concept behind is , we have maintain our inventory stock in three difference location , so when a person pick any item from Location 1 to Location 2 , they simply scan that item and the device will hit Rest Api Method that makes Item Adjustment in Database
Thanks

Clarifications on google custom search API v1 parameters

I am experimenting with the google custom search API (free version) for performing image search. I would like to commence with the paid version. However, I have some difficulties in understanding the pricing and some documented query parameters in the API calls at https://developers.google.com/custom-search/json-api/v1/using_rest#api-specific_query_parameters
1) In the free version, we have 100 queries/day. If I understood well, 1 query means a single API call. This call can return a maximum of 10 (since the parameter 'num' takes a maximum value of 10) results only. Is this both for free and paid versions? Or is it possible to retrieve more results per API request in the paid version? Precisely, can 'num' take values greater than 10?
2) The parameter 'start' is documented as index of the first result to return. In the free version, I cannot get more than 100 results for a specific query (parameter 'q'). To summarize precisely, I can get 10 results/API call, each call with parameter 'start' taking the values 1, 11,... 91 and same value for 'q'. The API call returns an error for any value of 'start' greater than 91. Is n't the free version supposed to allow 100 API calls? Or perhaps, this restriction is placed to avoid being able to retrieve more than 100 results per search term 'q'?
3) In the paid version, are API calls which return non-200 responses billed for as well?
4) In the paid version, how many API calls can be made for a specific search term 'q'?
5) Do you think there are particular restrictions with respect to the number of results that apply specific to image search only?
Thanks in advance for your help.
The results are paginated. The search results show 10 per page. If you want more you need to set the start page to 11 & get 10 more. It is an exact imitation of what would happen in Google UI search. If you have trouble understanding goto Google search and observe the results. It should match almost. parameter n must be the number of results per page.
In the free version you have 100 free/day. Anything else will 0.5 cents per request. You cannot make more 10k calls per day. So free is not actually free.
In the "paid" version you can buy in bulk. AFAIK there is no daily limit. You can "buy" let us say 11000 requests for 55$ (11000*0.5) and use it all up in one day. But the paid version will be ended soon :( . Please check this blog for info https://customsearch.googleblog.com/

Yammer REST API - Message Likes

My goal is to get the users who liked each message/comment, and when the like occurred. Currently when querying the Messages endpoint each message has a section called liked_by that contains a count of the total likes on each message/comment, and an array of users that liked the message/comment. However, what I am seeing is that the array with the list of users can not return more than 4 users in the array, even though the message/comment has a total of more than 4 likes. Specifically, if the message/comment has exactly 4 likes, then 4 users are returned in the array. However if the message/comment has greater than 4 likes, only 3 users are returned in the array.
Is there a way to get the Messages endpoint to return all the users who liked each message/comment in the array? Or is there possibly another way to pull message/comment likes with what message/comment was liked, by what user it was liked by, and at what time the like occurred?
Thanks!
The Yammer API will only return users that have liked a message as follows:
1 - If three people like a message, display all three
2 - If four people like a message, display all four
3 - If five people or more like a message, display three and use the front-end code to say "x, y, z and n others liked this" (where n = total number of likes minus 3)
There is no workaround that I can find to display all the users that liked a particular message.
four years later there is a workaround for this, please see this answer:
See here for further details - https://developer.yammer.com/docs/usersliked_messagemessage_idjson

ESPN API, results of College Football teams not showing all teams

A question for the ESPN API team...
I'm using the ESPN API, and when I use the Teams API to pull a list of College Football teams:
I don't get a full list of all NCAA Football Teams
I can't tell what the reasoning of the teams that ARE listed is
(i.e. 1st result is id:2, 2nd result is id:5)
Is there a reason only some Teams show up? And for the teams that DO show up, what is the rhyme or reason to them being the ones that have been selected to show up?
Thanks for the help! I can add additional info or screenshots if needed at all-
If you set the limit to -1, you get all of the teams.
The teams API uses pagination based on the resultLimit, resultOffset and resultCount nodes in the API response. You can use the offset and limit GET parameters to get a larger, smaller result set as well as use them to make multiple requests in order to get all the teams in multiple requests.
For example: try setting limit to something larger than the default of 50.

Resources