Git Product home page Git Product logo

Comments (3)

pleary avatar pleary commented on August 15, 2024 1

unintentional. Should be fixed now

from inaturalistapi.

pleary avatar pleary commented on August 15, 2024

This should be all set now.

I'm starting to think ahead to V2 of the API, with one goal making the responses a lot smaller. Right now for example, if you fetch http://api.inaturalist.org/v1/observations?taxon_id=27805 you'll get by default 30, but up to 100 observations, all of the same taxon, so all the metadata about the taxon is repeated 30 to 100 times, making the response very large. For this case the response is 31KB for 30 results with details, and 13KB w/o details (these might be the size of the results when gzipped, so larger if we weren't doing compression).

I'm mostly interested in keeping the size of the responses smaller, which is hard to do with the nested nature of JSON. One option is we just return a very minimal object for the taxon, like just its ID, and force the client to make API calls for the taxa they want details for. Another approach would be to denormalize the response a bit so again the observation just has a taxon_id, but later in the document we list out the full taxon object, but only do it once. Something like what you can do with YAML.

Alex, do you have any thoughts on that from an iOS perspective? How much of a pain would it be for you to have to make 2 calls - one to fetch observations, and another to fetch all their taxa in a single call (e.g. v1/taxa/1,2,3,50,100). And how difficult would it be to parse a non-nested JS document, or something like a YAML document with pointers in it?

from inaturalistapi.

alexshepard avatar alexshepard commented on August 15, 2024

I'm getting wikipedia_summary for http://api.inaturalist.org/v1/taxa/10094 but not http://api.inaturalist.org/v1/taxa/10325?locale=en-US

Is that expected?

from inaturalistapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.