How to get Entire Product Category hierarchy of an ebay site? [closed] - ebay-api

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
There is an existing stackoverflow question which answers this question but the call isn't working anymore.
I tried adding http://open.api.ebay.com/Shopping?callname=GetCategoryInfo&appid=YOUR-APP-ID&siteid=3&CategoryID=-1&version=729&IncludeSelector=ChildCategories&DetailLevel=ReturnAll
But it didn't help.
It is still possible to return the entire hierarchy in one call?
To the call but that didn't help.

this is what works for me. I am able to get all categories with this URL:
var url = "http://open.api.ebay.com/Shopping";
url += "?callname=GetCategoryInfo";
url += "&appid=YourAppId"; //replace with your appID
url += "&siteid=0"; //3 = UK | 0 = US
url += "&callbackname=cb_listCategories"; //callback function
url += "&CategoryID=-1";
url += "&version=729";
url += "&IncludeSelector=ChildCategories";
url += "&responseencoding=JSON"; //or XML for example
After that, it's just a matter of listing the categories on your html by creating a callback function, called "cb_listCategories" in my example.
Please let met know if I can help any further. Take care.

Related

prestashop 1.7 change lenght product name [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I tried create new product of length 2 charset but it get error "This value is too short. It should have 3 character or more." How can I change min length?
You can change in following file
prestashop17\src\PrestaShopBundle\Form\Admin\Product\ProductInformation.php
line no 150
new Assert\Length(array('min' => 3, 'max' => 128))

selenium webdriver word count from page source [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
how to get edit id count
i have tried as belowpagesource code
string[] rowcount=driver.getPageSource().split("a
The ideal method is the one suggested by Buaban, you should ideally use findElements for such purposes using the element attributes:
int rowcount = driver.findElements(By.xpath("\\a[contains(#id,'edit')]")).size();
But if still you want to go via getPageSource(), it's going to be a bit tricky. Since, you would be getting a string now without much distinction between elements and their attributes. You'll have to use some core java concepts here:
String str = driver.getPageSource();
String findStr = "id=\"edit";
int rowcount = str.split(findStr, -1).length-1;
Hope, it helps.
You can find the elements that id contains 'edit' then count the results. See code below:
int rowcount = driver.findElements(By.cssSelector("[id*='edit']")).size();

Google Rest api to get primary mail [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
How to get the gmail primary mail using Google rest API.Currently i am using the GET https://www.googleapis.com/gmail/v1/users/userId/messages Rest API but that will give the social and promotion mail.I am referring this site:https://developers.google.com/gmail/api/v1/reference/users/messages/list
Try adding this as a filter in your query when calling messages.list
[ in:inbox -category:{social promotions updates forums} ]
that only gives you the good stuff. It's basically saying give me everything in the inbox apart from social, promotions, updates and forums.
Or in my inbox I also seem to have updates so you'd change to
[ in:inbox -category:{social promotions forums} ]
Cheers
John
Its pretty straight forward actually
We can query the messages by using labels. Labels are of two types System labels and User Labels.
For primary we can use System label called "INBOX" and get the emails that belong to that category. There are other system labels like CATEGORY_PROMOTIONS, CATEGORY_SOCIAL etc.
You can use the Try It! feature with Google to test it out.
Get labels:
https://developers.google.com/gmail/api/v1/reference/users/labels/list
For a given label, say INBOX in your case query the messages
https://developers.google.com/gmail/api/v1/reference/users/messages/list
You can also get the STARRED, CATEGORY_PERSONAL for starred and important emails from the inbox.
Edited for sample code.
Java Code Sample available within the link, but a snippet here:
public static void listLabels(Gmail service, String userId) throws IOException {
ListLabelsResponse response = service.users().labels().list(userId).execute();
List<Label> labels = response.getLabels();
for (Label label : labels) {
System.out.println(label.toPrettyString());
}
}

To write a function, to get the next folder level in the file path [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I am new to sql server, I need to do a task where a function should be created, and in that, a string of a file path will be given as an input parameter and it should give the rest of the file path as output.
For example, "Users\appu\Documents\Visual Studio 2008\Projects" is the file path, here if I give Users as input parameter it should give the next folder level, or if I give Documents as input parameter, it should give next folder level after that which is '\Visual Studio 2008'.
In this way I need to write a function, can you guys help me in this please.
Thanks,
Ranjit
Please try:
declare #Str nvarchar(max), #SearchStr nvarchar(max)
set #Str='Users\appu\Documents\Visual Studio 2008\Projects'
set #SearchStr='appu'
SELECT STUFF(#Str, 1, CHARINDEX(#SearchStr+'\', #Str)+LEN(#SearchStr), '')

selecting 0776578969 from database and displaying 0776 578 969 [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
trying to display data with space from database (ms-access) eg selecting 0776578969 and displaying 0776 578 969 using access and vb. Help
If you need this in a report or form, then just use custom format.
(in the format setting just go:
#### ### ###
And, in code, you can go:
Format("your value","#### ### ###")
Access is a business application development tool, and such types of string processing and having to use VBA code is not required for common formatting in reports, forms. And even as above shows, for code you don't process using mid$ etc, but use formatting command.
If you are wanting to perform this in MS Access, then you will want to review the Left, Mid and Right function. Here is a sample query that should give you the results you want:
Test Table:
PhoneNumber
776578969
123456789
SELECT Left(test.phonenumber, 3) & " " & Mid(test.phonenumber, 4, 3) & " " & Right(test.phonenumber, 3)
FROM test;
Results:
776 578 969
123 456 789