Cloudinary Search API using multiple tags - cloudinary

I am using the Search API (.net) and need to search using multiple tags.
Example:
tags: shoe and women and red
This should return all shoes for women that are red. Using a single tag .Expression("tags=shoe") works but not multiple tags.
Failed Code:
SearchResult result = cloudinary.Search()
.Expression("tags=shoe women red")
.Execute();
Failed Code:
SearchResult result = cloudinary.Search()
.Expression("tags=shoe,women,red")
.Execute();
Both examples do not work with multiple tags.
How do I search using the Search API with multiple tags?

Solved by using the following:
SearchResult result = cloudinary.Search()
.Expression("tags=shoe AND women AND red")
.WithField("tags")
.Execute();
Using the AND between each tag worked.
I have asked Cloudinary Support to update the docs:
https://cloudinary.com/documentation/search_api#expression_fields

Related

Youtube API channel search - how to get channel ids by using video ids

I am using the Youtube API for a simple search for music in a specific genre. In the results set I get only videos ids and the part with channel ids is empty. Is there any way to generate/get the channel ids from the retrieved videos?
I have tried to look only for channels, but the result set is either completely emtpy or contains 1-2 results.
youtube.search().list(q = query,
part = "id",
#type = 'channel, video',
maxResults = max_results).execute()
I would like to get both videos and channel ids and currently I am receiving only a list of videos that match with the search query.
Yes, just request the 'snippet' part as well. The snippet section contains the channelId of the video.

How to get variation specific image from a listing with eBay API GetItem

I'm trying to get variation images, I have tried multiple things and nothing seems to work out.
I have one variation on all my listings called size. Within this I have Small, Medium, Large, Set of 3.
I have managed to get the main image with this code:
Dim fetchedItem As ItemType
Dim Apicall As GetItemCall = New GetItemCall(Context)
Apicall.DetailLevelList.Add(DetailLevelCodeType.ReturnAll)
fetchedItem = Apicall.GetItem(myItemID)
Dim imageURL As String = fetchedItem.PictureDetails.GalleryURL.ToString()
Try using a different API call: GetSingleItem. You can either POST or GET your API request. http://developer.ebay.com/DevZone/shopping/docs/CallRef/GetSingleItem.html
Be sure to use an IncludeSelector for additional data in the response.

Get BlogPost based on Taxonomy

I'm trying to create a custom Blog post rotator for a homepage. It shows the 5 newest posts (Title, summary, date, and link) this works with the following code
var posts = App.WorkWith().BlogPosts().Publihed().Get().OrderByDescending(p => p.PublicationDate).Take(5)ToList();
But I only want to get posts with specific Tags. I'm able to get the Guid associated with a specific tag
TaxonomyManager taxmanager = TaxonomyManager.GetManager();
var taxonGuidId = taxmanager.GetTaxa<FlatTaxon>().Where(t => t.Name == "SpecificTag").Single().Id;
I can foreach through every post and see lots of information but cannot figure out how to determine if the specific Guid is attached to that post. Or take the post and get a list of Taxon; something like
var postTaxon = GetTaxon(BlogPost)
Is there a reason you need to use a custom widget? I would recommend using the standard list widget for blogs select the tag you want to show and then limit it to 5. Once you do that you can then us your JavaScript to create the rotator from the default classes or modify the template to have custom classes.

Cust google custom search "No Result" string to link

I'm using google CSE in my site. But I want to change the "No Result" string to a link, or redirect the page when no search result.
I tried noResultsString attribute but it accept String only. How can I use HTML Tag like<gcse:searchresults noResultsString="<a src='testSrc'>no-result link</a>"></gcse:searchresults>? Or can I redirect the result page when no-result?
Use JavaScript, then specify names or ids then the functions if there is no results.
Here is an intro tutorial that does not specify an id relating to your case, but is using timers for a redirect http://www.tutorialspoint.com/javascript/javascript_page_redirect.htm

gdata API return no results

I am just using this url to find the top rated videos on youtube with the word "scared".
http://gdata.youtube.com/feeds/api/standardfeeds/top_rated?q=scared
I am not using category or keywords because if I use it, Youtube doesn´t return videos without tags.
I want that Youtube looking for "scared" by title and description, so I am using "search query term": "q=".
But, using "q=scared", this link returns only 1 video. Why?
Another example that are no result - using "most_recent" and keyword "scary":
/feeds/api/standardfeeds/most_recent/-/%7Bhttp%3A%2F%2Fgdata.youtube.com%2Fschemas%2F2007%2Fkeywords.cat%7Dscary
And using q="scary", no result neither:
/feeds/api/standardfeeds/most_recent?q=scary
How can I get the videos using a "search" word?
Thanks!
try using this:
http://gdata.youtube.com/feeds/api/videos?q=scared
hopefully that will work.