Developers

Flat
Is there an API call to get list of all unprinted parts?
User: tedsgamz
Date: 4/16/2014 7:00 pm
Views: 2636
Rating: 0

I am writing what I hope will be an off-line game designer application and could not find such a call.  Or am I just missing it?

Re: Is the an API call to get list of all unprinted parts?
JT
User: JT
Date: 4/16/2014 7:22 pm
Views: 3
Rating: 0
Yup. It exists. You just call the normal parts search function with no parameters, like this:

GET https://www.thegamecrafter.com/api/part

You’ll have to page through all 36 pages if you want to get all of the parts.  So you’ll end up doing 36 calls, but if you’re building this to be an offline tool then you’ll be caching that data locally so you won’t be making those 36 calls all that often.

Subsequent requests will be like this:

GET https://www.thegamecrafter.com/api/part?_page_number=2

And so on.
Re: Is there an API call to get list of all unprinted parts?
User: tedsgamz
Date: 4/16/2014 8:42 pm
Views: 0
Rating: 0

Thanks.  I just found that I can get them all in one call by using the _items_per_page param :)

Re: Is there an API call to get list of all unprinted parts?
JT
User: JT
Date: 4/16/2014 9:01 pm
Views: 1278
Rating: 0

Thanks.  I just found that I can get them all in one call by using the _items_per_page param :)

Actually you just exposed a bug. There’s supposed to be a hard limit enforced of 100 items per page. Now that I know about it I’ll be fixing that bug shortly, so please update your code to page through at no more than 100 per page. 
PreviousNext