Skip to content
danielstreit edited this page Sep 4, 2014 · 33 revisions

Collection Data Schema:

  {
    title: String,
    url: String,
    description: String,
    stars: Number,
    user: {
      provider: String,
      id: String,
      fullName: String,
      givenName: String
    },
    links: [
      { 
        url: String, // external url of the link
        title: String,
        description: String
      },{
         // More links here...
      }
    ]
   }

<b?url</b></b?url</b> is the title scraped of invalid url characters. Currently: domain.com/#/:url

user object is roughly modeled after [passport](http://passportjs.org/guide/profile/)

Postman link to example queries: https://www.getpostman.com/collections/b82a082182ff730112f7

Endpoints:

Create a new collection

'POST to /api/collection/create'; Example POST data: { "title": "A New Collection", "description": "So many good links", "user": { "provider": "github", "id": "1234", "fullName": "John Johnson", "givenName": "John" }, "links": an ARRAY of collection meta data objects. Each element of the returned ARRAY: {"_id":"540629a19850458c1ec42c60", "description":"Angular Tutorials", "title":"Angular", "url":"angular", "user":{ "givenName":"Oslo", "fullName":"Oslo Bar", "id":"Oslo", "provider":"test" }, "stars":0 },{ "_id":"54065ce927cc69d4045015e4", "description":"The cutest", "title":"Puppies", "url":"puppies", "user":{ "provider":"test", "fullName":"Oslo", "id":"Oslo", "givenName":"Oslo" }, "stars":0 } garbagean ARRAY of collection meta data objects.

Each element of the returned ARRAY: {"_id":"540629a19850458c1ec42c60", "description":"Angular Tutorials", "title":"Angular", "url":"angular", "user":{ "givenName":"Oslo", "fullName":"Oslo Bar", "id":"Oslo", "provider":"test" }, "stars":0 },{ "_id":"54065ce927cc69d4045015e4", "description":"The cutest", "title":"Puppies", "url":"puppies", "user":{ "provider":"test", "fullName":"Oslo", "id":"Oslo", "givenName":"Oslo" }, "stars":0 }

Clone this wiki locally