Here is the api i'm pulling from:
http://api.eventful.com/rest/events/search?app_key=p4t8BFcLDtCzpxdS&location=Houston,Tx&sort_order=popularity&date=future
All is fine, except I'm stumped on pagination.
The current page number and the total number of pages is provided in the xml. Now i'm just not sure how to paginate from it.
Related
I am using the PHP SDK to create and send documents. I need to insert initial here on all pages, except the signature pages.
The content of the document is variable, it can have at least 7/8 pages. So I believe that using templates is not interesting.
Is there a way to place the initial here on all pages, without knowing the number of pages?
Is it possible to count the number of pages before sending the document?
What solution could you apply?
Yes, you can make an API call to get all the documents meta-data which include the number of pages in each document.
When you add an initial tab (or any tab) you get to set the page number.
So that's the simple approach I would use. Add it to pages 1 .. n-1 and find n by making another API call.
PHP call:
envelopes_api->getEnvelopes($account_id, $envelope_id);
In our old project we're using Alfresco 4.2.c community version.
There's a task page there, were you can use predefined filters to manage data you want to see.
I was able to add some extra filters there, anyway another problem stands in my way.
There's a paginator there, probably from YUI, which works by two parameters, maxCount and skipCount.
Right now it's configured to show max 400 records on one page.
I'm trying to add an option to display all records at once. Is anyone familiar enough with that system to even tell if it's possible? YUI framework is very hard to manage.
It seems like on every page or filter change it redirects you to ahref='#', a then a method reads the filter id and gives some extra parameters to the request. I can't find a way to maybe bind another button to reload the page in the same manner and just add another line to the request, which would make the paginator show all the records at one page.
There are several websites within the cruise industry that I would like to scrape.
Examples:
http://www.silversea.com/cruise/cruise-results/?page_num=1
http://www.seabourn.com/find-luxury-cruise-vacation/FindCruises.action?cfVer=2&destCode=&durationCode=&dateCode=&shipCodeSearch=&portCode=
In some scenarios, like the first one shown, the results page follows a patten - ?page_num=1...17. However the number of results will vary over time.
In the second scenario, the URL does not change with pagination.
At the end of the day, what I'd like to do is to get the results for each website into a single file.
Q1: Is there any alternative to setting 17 scrapers for scenario 1 and then actively watching as results grow/shrink over time?
Q2: I'm completely stumped about how to scrape content from second scenario.
Q1- The free tool from (import.io) does not have the ability to actively watch the data change over time. What you could do is have the data Bulk Extracted by the Extractor (with 17 pages this would be really fast) and added to a database. After each entry to the database, the entries could be de-duped or marked as unique. You could do this manually in Excel or programmatically.
Their Enterprise (data as a service) could do this for you.
Q2- If there is not a unique URL for each page, the only tool that will paginate the pages for you is the Connector.
I would recommend you to build an extractor to get the pagination. The result of this extractor will be a list of links, each link corresponding to a page.
This way, every time you run your application and the number of pages changes, you will always get all the pages.
After that, make a call for each page to get the data you want.
Extractor 1: Get pages -- Input: The first URL
Extractor 2: Get items (data) -- Input: The result from Extractor 1
I'm writing a quick python app to get stats on my public GitHub project.
When I call (https://api.github.com/repos/user/project/pulls), I get back some json, but because my project has more than 30 outstanding PRs, I get a Link response header with the next and last URLs for me to go call to get all PRs.
However, when I perform a parallel query for issues with a certain label (https://api.github.com/repos/user/project/issues?labels=label&status=opened), I only get 30 back (the pagination limit), but my response header doesn't have a next Link in it for me to follow. I know my project has more than 30 issues that match that label.
Is this a bug in the GitHub API, or in what I'm doing? Alternatively, I don't actually care about the issues themselves, just the count of issues with that label, so is there another way to just query for the count?
Accoding to the API document Search and Pagination section on http://developers.soundcloud.com/docs/api/guide#search
I build my query URL like:
https://api.soundcloud.com/tracks?q=U2&client_id=xxxxxxxx
It did only return 10 results.
Even I add limit and offset parameters to make results with Pagination, like "&limit=20&offset=20", it is still only 10 results returning.
Does it mean we can not use pagination with soundcloud search API?
This was a bug in the SoundCloud API and should be resolved now. Please comment if you are still experiencing the problem.