product search filter by store - walmart-api

The Walmart Open API doesn't seem to honor storeID as a filter parameter.
For example, I want my backend code (java) to search for BREAD filtered to a particular store. Is this possible with Any Open API ?
Here is my query
https://developer.api.walmart.com/api-proxy/service/affil/product/v2/searchquery=bread&facet=on&facet.filter=brand:Wonder&numItems=3&storeId=5294
The returned result seems to always ignore the storeId.
Any thoughts ?

Related

How to search users in Microsoft Graph SDK with C#?

In my C# application, I am using Microsoft Graph SDK with Azure AD implementation.
Please suggest me how to search users in my organisations (global contacts) based on search parameters .
For example , if "Raj" is the search parameter, I should be able to get all users with their name contains "Raj" or email address contains "Raj".
I found this method to get all users - "graphClient.Users.Request().GetAsync();". but, with this method limited response, I am not getting what exactly I want to search.
Thanks,
Shashidhar
Adding to the previous answer: to accomplish this through the Graph C# SDK, use the Filter() method:
graphClient.Users.Request().Filter("startsWith(displayName, 'k')").GetAsync()
You can use other methods on the request to customize the request, e.g. Select(), etc.
According to your description, I assume you want to search the users by using the search parameters.
Based on this document, we can currently search only message and person collections.
And I have tried the filter query parameter, the parameter is currently not supported the contains operator from this document. So if you want to search the user with name or the email address, we can use the startswith operator only.Like this:
https://graph.microsoft.com/v1.0/users?$filter=startswith(displayName,'k') or startswith(mail,'k')
It will find the user's diplayName or mail which is start with the k

download a list users from twitter

I have a list of "n" Twitter ID representing users I would like to download.
To retrieve their user profile info, should I use n times the api call get_user or there exist a method to pass the entire list and retrieve all the info within one single api call, within the twitter rate time limit?
I tried something like
api.search_users(A)
api.search_users(id in A)
where A contains the list of id
but it does not work.
Anyone helping?
You can use the Twitter API resource https://dev.twitter.com/rest/reference/get/users/lookup. It can return user objects for at most 100 users at a time.
You can use this in Tweepy like:
user_objects = api.lookup_users(user_ids=list_of_at_most_100_user_ids)
Much of this answer first appeared as part of https://stackoverflow.com/a/42946854/1921546

Dailymotion graph API user activities

I am using the graph API of dailymotion and in particular the /user/<id>/activities feature.
There is no parameter to sort the list and no specification for the default sort order. Is there any guarantee that it is sorted by created_time (or something else) ?
The documentation :
https://www.dailymotion.com/doc/api/explorer#/user/activities/list
The api explorer :
http://www.dailymotion.com/doc/api/obj-user.html#user-activities-connection
Thanks a lot for your input on this!
Thank you for reporting this issue. You where right, the order was already assumed to be created_time behind the scene. From now on, there is a new sort parameter that you can use to order the result set on /activities and /user/<xid>/activities. For example:
https://api.dailymotion.com/user/<xid>/activities?fields=id,type&sort=recent

How to Query Sales Order by Order Number?

I've gotten frustrated with the .NET DevKit and am now considering switching my app over to XML. But I'm still having trouble figuring out how to perform very basic queries.
How can I retrieve a QBD Sales Order by the order number? This is the "Sales Order Number" in the QBD UI, "RefNumber" in the SDK, and "DocNumber" in IPP.
Just in case somebody needs me to explain the use case for looking up a record by the human-readable unique ID: I'm integrating with a system where we don't have the luxury of storing a QB transaction ID after importing a sales order. So if that system wants to query QB later to check the status of a sales order, it needs to do so by that system's unique order #.
I already have links to all the documentation; thanks. I just need to know how to perform this query. Similarly, I need to do it for Invoices and POs.
I need the same thing for Items, the use case being that if we're importing items from another system, we need to query the QB item list by name to see if we already have that item in QB.
For ITEMS, you can use ItemConsolidated and a NameContains filter. For example, the XML would look something like:
POST https://services.intuit.com/sb/itemconsolidated/v2/<realmID>
...
<?xml version="1.0" encoding="UTF-8"?>
<ItemConsolidatedQuery xmlns="http://www.intuit.com/sb/cdm/v2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.intuit.com/sb/cdm/v2 RestDataFilter.xsd ">
<NameContains>Your item name goes here</NameContains>
</ItemConsolidatedQuery>
It won't be perfect, because Intuit only supports "NameContains" (the item name contains the string you specify) rather than "NameEquals", but you can then loop through what you get back and filter it client-side from there.
For SALES ORDERS, unfortunately, Intuit Data Services doesn't support querying by DocNumber at this time.
Instead, a work-around for your situation might be to query for all sales orders, and then cache the Id and DocNumber value of each in your application. When you need to look something up, look up the Id in the cache, and then query by Id value. It's not pretty... but it's really the only way you can do what you're describing.

Is there a way to use since_id and max_id in Twitter's Search API?

I'm trying to get the search results between two specific id's but it seems to ignore the ids, here is a sample of my query:
http://search.twitter.com/search.json?since_id=58308825907871744&q=%23twitter&rpp=100&max_id=58309448581660674
It just throws back the same set of results if I change the ids. Any ideas?
Unfortunately, the search API doesn't support a max_id parameter. It features an until parameter instead, which is specified as a date rather than a status ID. So, you would have to reformat your query something like the following:
http://search.twitter.com/search.json?since_id=58308825907871744&q=%23twitter&rpp=100&until=2011-04-14
Twitter API issue 2052 details Twitter's response to the very issue that you raise.
Note that in v1.1 max_id is supported on the search api.
https://dev.twitter.com/rest/reference/get/search/tweets#api-param-max_id

Resources