CS4431 / CS4431-android

0 stars 0 forks source link

Work out how to best display listings. #8

Closed tadgh closed 10 years ago

tadgh commented 10 years ago

Currently, the listings API returns only the Book ID of the book that is for sale. That means that we have to figure out how to link the Book title and edition of the book based on the edition_id. Here are the options as I see them.

  1. Ask the API team to modify or create a route to return everything we need in a single call. (more work for the server).
  2. Make API calls to /book using the edition_id gotten from the /sell result.(needs more API calls, slows things down)
  3. Compare the edition_id to every element in our list of books, and match them up. (slow)
  4. Make a Hash of our books, with edition_id as the key for fast local lookup. (uses more space)

Frankly i don't like the idea of doing local lookups because then its dependent on our data. We could do the secondary API calls to fill in information, but I don't really like that either. Opinions? Maybe we can get the API team to make us another route? Sean is this easily feasible?

@crrozic @flyingtoaster0 @mikecolistro @sean-h

sean-h commented 10 years ago

The json could be set up to return all books referenced in the sells. This could be put after all the sell listings so the json would look something like: { { "kind": "sell", "data": { "edition_id": 1 } }, ...more sells... { "kind": "book", "data": { "id": 1 } }, ...more books... }

Then the data would be put together locally.

prospider commented 10 years ago

Are you going to be always showing book information on a sell? If so we can configure the routes to return additional information. On Feb 18, 2014 9:43 PM, "Sean Humeniuk" notifications@github.com wrote:

The json could be set up to return all books referenced in the sells. This could be put after all the sell listings so the json would look something like: { { "kind": "sell", "data": { "edition_id": 1 } }, ...more sells... { "kind": "book", "data": { "id": 1 } }, ...more books... }

Then the data would be put together locally.

Reply to this email directly or view it on GitHubhttps://github.com/CS4431/CS4431-android/issues/8#issuecomment-35460515 .

tadgh commented 10 years ago

Well the sells need at least book title and edition. On Feb 18, 2014 9:45 PM, "David Bel" notifications@github.com wrote:

Are you going to be always showing book information on a sell? If so we can configure the routes to return additional information. On Feb 18, 2014 9:43 PM, "Sean Humeniuk" notifications@github.com wrote:

The json could be set up to return all books referenced in the sells. This could be put after all the sell listings so the json would look something like: { { "kind": "sell", "data": { "edition_id": 1 } }, ...more sells... { "kind": "book", "data": { "id": 1 } }, ...more books... }

Then the data would be put together locally.

Reply to this email directly or view it on GitHub< https://github.com/CS4431/CS4431-android/issues/8#issuecomment-35460515> .

Reply to this email directly or view it on GitHubhttps://github.com/CS4431/CS4431-android/issues/8#issuecomment-35460628 .

prospider commented 10 years ago

Issue #14 created for this request On Feb 18, 2014 9:52 PM, "Gary Graham" notifications@github.com wrote:

Well the sells need at least book title and edition. On Feb 18, 2014 9:45 PM, "David Bel" notifications@github.com wrote:

Are you going to be always showing book information on a sell? If so we can configure the routes to return additional information. On Feb 18, 2014 9:43 PM, "Sean Humeniuk" notifications@github.com wrote:

The json could be set up to return all books referenced in the sells. This could be put after all the sell listings so the json would look something like: { { "kind": "sell", "data": { "edition_id": 1 } }, ...more sells... { "kind": "book", "data": { "id": 1 } }, ...more books... }

Then the data would be put together locally.

Reply to this email directly or view it on GitHub< https://github.com/CS4431/CS4431-android/issues/8#issuecomment-35460515> .

Reply to this email directly or view it on GitHub< https://github.com/CS4431/CS4431-android/issues/8#issuecomment-35460628> .

Reply to this email directly or view it on GitHubhttps://github.com/CS4431/CS4431-android/issues/8#issuecomment-35460925 .