Skip to content

Latest commit

 

History

History
412 lines (223 loc) · 9.73 KB

DOCS.md

File metadata and controls

412 lines (223 loc) · 9.73 KB

shop-scraper v0.0.0

Auth

Authenticate

POST /auth

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
access_token String

Master access_token.

Authenticate with Google

POST /auth/google

Parameters

Name Type Description
access_token String

Google user accessToken.

Cron

Run cron to scrap products

GET /cron

Log

Retrieve logs

GET /logs

Parameters

Name Type Description
q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

PasswordReset

Send email

POST /password-resets

Parameters

Name Type Description
email String

Email address to receive the password reset token.

link String

Link to redirect user.

Submit password

PUT /password-resets/:token

Parameters

Name Type Description
password String

User's new password.

Verify token

GET /password-resets/:token

Product

Create product

POST /products

Parameters

Name Type Description
title

Product's title.

link

Product's link.

image

Product's image.

price

Product's price.

store

Product's store.

Delete product

DELETE /products/:id

Retrieve product

GET /products/:id

Retrieve products

GET /products

Parameters

Name Type Description
q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update product

PUT /products/:id

Parameters

Name Type Description
title

Product's title.

link

Product's link.

image

Product's image.

price

Product's price.

store

Product's store.

Search

Search for products

GET /search

Parameters

Name Type Description
term String optional

Term to search.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

TrackedProduct

Create tracked product

POST /tracked-products

Parameters

Name Type Description
access_token String

user access token.

product Object

Product to track.

desiredPrice Number

Tracked product's desiredPrice.

notify Boolean

Should notify user when the price drops.

Delete tracked product

DELETE /tracked-products/:id

Parameters

Name Type Description
access_token String

user access token.

Retrieve tracked product

GET /tracked-products/:id

Parameters

Name Type Description
access_token String

user access token.

Retrieve tracked products

GET /tracked-products

Parameters

Name Type Description
access_token String

user access token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update tracked product

PUT /tracked-products/:id

Parameters

Name Type Description
access_token String

user access token.

desiredPrice Number

Tracked product's desiredPrice.

User

Create user

POST /users

Parameters

Name Type Description
access_token String

Master access_token.

email String

User's email.

password String

User's password.

name String optional

User's name.

picture String optional

User's picture.

role String optional

User's role.

Delete user

DELETE /users/:id

Parameters

Name Type Description
access_token String

User access_token.

Retrieve current user

GET /users/me

Parameters

Name Type Description
access_token String

User access_token.

Retrieve user

GET /users/:id

Retrieve users

GET /users

Parameters

Name Type Description
access_token String

User access_token.

q String optional

Query to search.

page Number optional

Page number.

limit Number optional

Amount of returned items.

sort String[] optional

Order of returned items.

fields String[] optional

Fields to be returned.

Update password

PUT /users/:id/password

Headers

Name Type Description
Authorization String

Basic authorization with email and password.

Parameters

Name Type Description
password String

User's new password.

Update user

PUT /users/:id

Parameters

Name Type Description
access_token String

User access_token.

name String optional

User's name.

picture String optional

User's picture.