Comments (2)
Apologies if that isn't clear. \d+
is a regular expression which matches one or more digits. So 1
, 91
, 871
, are all valid (up to the max number of 1000
items).
In your case you could use
puts client.get("/1.0/library?max_results=450").body
to get all the books in your library. If you had 1500 books, for example, you could use
puts client.get("/1.0/library?max_results=1000&page=1").body
puts client.get("/1.0/library?max_results=1000&page=2").body # To get the last 500 books
Audible uses the provided patterns on their end to validate input, which is why they're provided in the docs as-is. In most cases the provided patterns are mostly straight-forward, the most involved one I can see from skimming the docs is \d+(,\d+)*
which means one or more groups of one or more digits separated by commas
. So 10
, 1882,99891,124351
, etc.
Hope that helps.
from audible.cr.
Yes! That helps enormously.
- It looked suspiciously like a regular expression. I just wasn't sure how it could possibly be. It seemed to be out of context. Shifting my perspective to the endpoint, I could see how from Audibles end, a regular expression makes sense to validate the incoming calls.
Is it possible to make a note of this in the doc's?
I've been pouring over them for days. They are so far the best resource I've found on this subject.
Thanks
from audible.cr.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audible.cr.