Skip to content

Instantly share code, notes, and snippets.

@jasonagnew
Created February 16, 2015 15:52
Show Gist options
  • Save jasonagnew/f24ab41daed0e57dfc69 to your computer and use it in GitHub Desktop.
Save jasonagnew/f24ab41daed0e57dfc69 to your computer and use it in GitHub Desktop.
SMP

Smart Money People API End-Points:

/api/brands/:

Lists all brands' slugs, paginated with a max limit of 25 brands. Will also say pages left and total count of brands.

Example @ /api/brands/:

{
    "count": 2,
    "total": 76,
    "pages": 4,
    "page": 4,
    "brands": [
        {
            "slug": "some-brand"
        }
    ]
}

/api/brand/{brand}/:

Displays brand information: description, review rating, total count of products and reviews etc.

Example @ /api/brand/some-brand/:

{
    "slug": "some-brand",
    "name": "Some Brand",
    "description": "Lorem some brand ipsum.",
    "rating": 4.4,
    "reviews": 101,
    "products": 26
}

/api/brand/{brand}/products/:

Lists all of a specific brand's products, paginated with a max limit of 25 products. Will also say pages left and count of products.

Example @ /api/brand/some-brand/products/:

{
    "count": 1,
    "total": 26,
    "pages": 2,
    "page": 2,
    "products": [
        {
            "slug": "some-product"
        }
    ]
}

/api/brand/{brand}/product/{product}/:

Displays brand's product information: description, review rating, total count of reviews etc.

Example @ /api/brand/some-brand/product/some-product/:

{
    "slug": "some-product",
    "name": "Some Product",
    "description": "Lorem some product ipsum.",
    "rating": 3.8,
    "reviews": 26
}

/api/brand/{brand}/product/{product}/reviews/:

Lists all of a specific brand's product's reviews, paginated with a max limit of 25 reviews. Will also say pages left and count of reviews. Reviews will display the overall rating along with author name, star rating, title and description.

{
    "count": 1,
    "total": 26,
    "pages": 2,
    "page": 2,
    "reviews": [
        {
            "id": 7251,
            "reviewer": {
                "id": 9523,
                "display": "John Doe"
            },
            "rating": 3,
            "title": "Lorem review ipsum.",
            "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment