Giter Club home page Giter Club logo

userservices's Introduction

User Services

Services to handle user login and data, for ProjectJLOR.

Setup

npm install

Development

Make sure mongo is running locally and run node src/server.js.

Routes

GET /api/user/

Retrieve all users userData

GET /api/user/:fbId

Retrieve all userData for user with facebook id :fbId.

GET /api/user/:fbId/fields/:fields

Retrieve all userData for user with facebook id :fbId limited to :fields, where :fields is a comma-separated list.

POST /api/user

Pass an access token, a user's Facebook ID and email. The DB schema will grow to match any fields included in userData.

{
  "token": "testToken",
  "userData": {
    "id": "718325719",
    "name": "James Conkling",
    "gender": "male",
    "location": {
      "id": "110184922344060",
      "name": "Washington, District of Columbia"
    },
    "likes": {
      "data": [
        {
          "name": "The Forests Dialogue",
          "id": "113670252007668",
          "created_time": "2015-07-18T23:44:50+0000"
        },
        {
          "name": "Bearcat Wildcat",
          "id": "1686033758292206",
          "created_time": "2015-06-22T20:43:20+0000"
        },
        ...
      ],
      "paging": {
        "cursors": {
          "before": "MTEzNjcwMjUyMDA3NjY4",
          "after": "MjAzMzU0ODM2MzU2NTAz"
        },
        "next": "https://graph.facebook.com/v2.4/718325719/likes?access_token={{access_token}}&pretty=0&limit=25&after=MjAzMzU0ODM2MzU2NTAz"
      }
    },
    "link": "http://www.facebook.com/718325719",
    "feed": {
      "data": [
        {
          "story": "James Conkling shared a link.",
          "created_time": "2015-08-07T05:29:34+0000",
          "id": "718325719_10155854330400720"
        },
        {
          "message": "fyi",
          "created_time": "2015-08-03T14:48:15+0000",
          "id": "718325719_10204730491603625"
        },
        ...
      ],
      "paging": {
        "previous": "https://graph.facebook.com/v2.4/718325719/feed?since=1438925374&access_token={{access_token}}&limit=25&__paging_token=enc_AdCJOAYm7jnpD5HqMFeNbmqJxjqJZB2C3gvt6tefh5GYZA7DA9AKRBA94eaEPfrvzKg2ou4vWYVyyGILj7ImdkzIsX&__previous=1",
        "next": "https://graph.facebook.com/v2.4/718325719/feed?access_token={{access_token}}&limit=25&until=1420070750&__paging_token=enc_AdBRe5r5ACbT2ZCbOZCNlL7R2w6flLrArZCZBZCU9b43ZCUIhniZBrQWWsmk5i154XcfJXjZBAkCUwFJ4KQam50TZBagco16ZA"
      }
    }
  }
}

userservices's People

Contributors

jameslaneconkling avatar oshaikh13 avatar lina avatar

Watchers

James Cloos avatar Rene Loperena avatar

Forkers

reneloperena lina

userservices's Issues

Change underscore.

We need to change the underscore code for Node native functions or something optimized for node since the one we are using is for web-clients and might have a lot of "extra" code to support old web browsers (yay IE6)

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.