Skip to content

Instantly share code, notes, and snippets.

@Miaababikir
Last active July 6, 2019 06:57
Show Gist options
  • Select an option

  • Save Miaababikir/bf6093b21d2d03162fde1a54d71b7036 to your computer and use it in GitHub Desktop.

Select an option

Save Miaababikir/bf6093b21d2d03162fde1a54d71b7036 to your computer and use it in GitHub Desktop.

Library API Doc

Remember most of these endpoionts you should pass the (api_token).

Getting Latest Book List

  • URL

    /api/latest-books

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content:

          [
              "id": 1,
              "name": "voluptatem",
              "start_color": "22adf5",
              "end_color": "089CE9",
              "icon": null,
              "created_at": "2019-07-06 06:32:53",
              "updated_at": "2019-07-06 06:32:53",
              "books": [
                  {
                      "id": 1,
                      "title": "Et fugit id impedit quibusdam.",
                      "description": "Consequuntur ut dolores quo consequatur.",
                      "publish_date": "1994-11-24",
                      "price": "250",
                      "path": "books/fekra.pdf",
                      "category_id": 1,
                      "created_at": "2019-07-06 06:32:54",
                      "updated_at": "2019-07-06 06:32:54"
                  }
              ]
          ]

Getting Book page content

  • URL

    /api/books/{book_id}/pages/{page_number}

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content:

          [
              'content' 'lorem ipsum set mit',
              'picture' => '/image/url',
              'video' => '/video/url',
          ]

Register new user

  • URL

    /api/auth/register

  • Method:

    post

  • URL Params

    Required:

    name=[string] email=[string] phone=[string] gender=[1 OR 0]

  • Success Response:

    • Code: 200
      Content:

          [
              'id': '1'
              'name': 'Johne Doe',
              'email': '[email protected]',
              'phone': '12345678',
              'gender': '0',
              'api_token': 'ASEREWSDGFS464asd6asdasdas332341sasd'
          ]

Getting auth user profile

  • URL

    /api/profile

  • Method:

    GET

  • Success Response:

    • Code: 200
      Content:

          [
              'id': '1'
              'name': 'Johne Doe',
              'email': '[email protected]',
              'phone': '12345678',
              'gender': '0',
              'api_token': 'ASEREWSDGFS464asd6asdasdas332341sasd'
          ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment