Code Monkey home page Code Monkey logo

Comments (9)

xanderbuck avatar xanderbuck commented on May 17, 2024 1

Successfully hit the following endpoints:

  1. /users - GET
  2. /users/:userId - GET
  3. /users - POST
  4. /images - GET

more to come

from bluepic.

rolivieri avatar rolivieri commented on May 17, 2024

These endpoints are under construction:

  • /users - GET - Returns all users.
  • /users/:userId - GET - Returns a specific user, given the userId value.
  • /users - POST - Creates a new user - The payload should be a JSON document; as of now, the only required field in the JSON document is name: {"_id": "123453", "name": "John Doe", "language": "en-US", "unitsOfMeasurement": "e"}, where _id is the facebook userId.
  • /images - GET - Returns all images metadata.
  • /users/:userId/images/:fileName/:displayName/:width/:height/:latitude/:longitude/:location - POST - Stores a new image under the specify user. The payload (body) of the request should only contain the binary data for the image. Use the REST endpoint URL to specify the values for the userId, fileName, displayName, latitude, and longitude values.
  • /users/:userId/images - GET - Returns images metadata for the specified user.

from bluepic.

xanderbuck avatar xanderbuck commented on May 17, 2024

@rolivieri When I create a new user (/users - POST) would it be possible to also get the full user record back? ie. also include the name?

right now it gives me

"{\n "id" : "129622",\n "ok" : true,\n "rev" : "1-6e5cfbbfee665ea3dc8563d5b9f4dc52"\n}")

from bluepic.

xanderbuck avatar xanderbuck commented on May 17, 2024

Also when I get user by id, the id key is "_id" where as when I do create user, the id key is "id", could we make those consistent.... hopefully getting the full user record back when I create a new user will fix that

from bluepic.

rolivieri avatar rolivieri commented on May 17, 2024

@xanderbuck Yes, I will certainly make those changes. The reason for the difference in _id vs id is that in one case you are getting back the raw response from Cloudant after adding a record. I will massage that response so that you are completely abstracted from it. Will also add the name. Keep you posted!

from bluepic.

rolivieri avatar rolivieri commented on May 17, 2024

@xanderbuck You can now pull the latest backend code. It has the changes discussed above.

from bluepic.

rolivieri avatar rolivieri commented on May 17, 2024

@xanderbuck - The following two endpoints have been changed:

  • /users - POST
  • /users/:userId/images/:fileName/:displayName/:latitude/:longitude/:city - POST

See description above for details on the updates for these two endpoints.

from bluepic.

xanderbuck avatar xanderbuck commented on May 17, 2024

Possible bug when you have images with the same file name

from bluepic.

xanderbuck avatar xanderbuck commented on May 17, 2024

Why do we call it displayName...? Shouldn't it be called caption?

from bluepic.

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.