You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.
I am developing an iOS app in which the user will watch/favorite many petitions. I need a way to request multiple petitions in one request for easier implementation and less network overhead on We the People's servers.
In my app, there is maintained a list of petition id's which the user is watching. I want to be able to specify multiple id's of the petitions I want in one API request. That way, I won't have to worry about exceeding my 10 request/second limit, and the We the People servers will not be bogged down with around 50 requests each time my users want to view their favorite petitions. Instead, one request would be sent.
Rather than fighting with the API(And worse perhaps ATT's 2g edge network),
there is a simpler way to get the information that you want and you can do
it in two api calls (currently).
And cache that JSON inside of your app, and then query that with
your petition IDs you can quickly determine the status
id: "5151eddb2f2c88aa6f000000", is closed with null response. (By far
my favorite petition ever...)
And because its all stored in your app data cache you can create your views
in milliseconds rather than the tens of seconds on an ATT edge network
in Alabama.
If you take a look at the source code to my iPhone app, https://github.com/roberte3/wethepeopleapp you can see how I implemented
it using NSArrays stored to the disk, rather than using a SQLite database
or coredata.
Feel free to little r me with any questions or if I can help out with your
app.
I am developing an iOS app in which the user will watch/favorite many
petitions. I need a way to request multiple petitions in one request for
easier implementation and less network overhead on We the People's servers.
In my app, there is maintained a list of petition id's which the user is
watching. I want to be able to specify multiple id's of the petitions I
want in one API request. That way, I won't have to worry about exceeding my
10 request/second limit, and the We the People servers will not be bogged
down with around 50 requests each time my users want to view their favorite
petitions. Instead, one request would be sent.
I am developing an iOS app in which the user will watch/favorite many petitions. I need a way to request multiple petitions in one request for easier implementation and less network overhead on We the People's servers.
In my app, there is maintained a list of petition id's which the user is watching. I want to be able to specify multiple id's of the petitions I want in one API request. That way, I won't have to worry about exceeding my 10 request/second limit, and the We the People servers will not be bogged down with around 50 requests each time my users want to view their favorite petitions. Instead, one request would be sent.
An example request may look like the following:
https://api.whitehouse.gov/v1/petitions.json?&id=1234&id=5678.
...or even
https://api.whitehouse.gov/v1/petitions.json.&id=1234%205678
This functionality is critical to the performance of my app.
The text was updated successfully, but these errors were encountered: