Bookmark API

Bookmarking is a convenient way of saving content for later reference.

Note

If any of the mentioned endpoint is resulting in an error please refer to the Errors section.

Bookmark Brief

This endpoint is responsible for bookmarking a entire brief document.

Note

This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.

Warning

It is compulsory to have prefix Bearer on Authorization header.

Request

URL : /bookmark/<brief-slug>/<brief-gid>

Method : POST

Example

curl --location --request POST 'https://platform-test.ranenetwork.com/public-api/v1/bookmark/cyber-digest/8-1836210' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data ''

Response

{
    "data": [{
        "email": "some.user@ranenetwork.com",
        "preference_slug": "bookmark",
        "value": {
            "brief_slug": "cyber-digest",
            "brief_gid": "8-1836210",
            "url": "brief:8-1836210"
        },
        "created_on": 1698655172
    }]
}

Response Formatter

  • preference_slug : type of preference that’s been added (will always be bookmark)

  • email : email of user for whom the content is bookmarked

  • brief_slug : slug of brief that’s been bookmarked

  • brief_gid : gid of brief that’s been bookmarked

  • url : computable url that uniquely helps identify bookmarked content

Bookmark Article

This endpoint is responsible for bookmarking a article published inside a specific brief.

Note

This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.

Warning

It is compulsory to have prefix Bearer on Authorization header.

Request

URL : /bookmark/<brief-slug>/<brief-gid>/<article-gid>

Method : POST

Example

curl --location --request POST 'https://platform-test.ranenetwork.com/public-api/v1/bookmark/cyber-digest/8-1836210/editorial_note' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data ''

Response

{
    "data": [{
        "email": "some.user@ranenetwork.com",
        "preference_slug": "bookmark",
        "value": {
            "brief_slug": "cyber-digest",
            "brief_gid": "8-1836210",
            "url": "brief:8-1836210/article:editorial_note",
            "article_gid": "editorial_note"
        },
        "created_on": 1698655172
    }]
}

Response Formatter

  • preference_slug : type of preference that’s been added (will always be bookmark)

  • email : email of user for whom the content is bookmarked

  • brief_slug : slug of brief that’s been bookmarked

  • brief_gid : gid of brief that’s been bookmarked

  • article_gid : article gid relevant to brief that’s been bookmarked

  • url : computable url that uniquely helps identify bookmarked content

GET Bookmarked Brief

This endpoint allows you to retrieve all of the bookmarked briefs.

Note

This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.

Warning

It is compulsory to have prefix Bearer on Authorization header.

Request

URL : /bookmark/brief

Method : GET

Example

curl --location 'https://platform-test.ranenetwork.com/public-api/v1/bookmark/brief' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data ''

Response

{
    "data":[
            {
                "name": "Cyber Digest",
                "date": "October 13 2023",
                "slug": "cyber-digest",
                "gid": "8-1836210",
                "bookmarked": true,
                "upgrade": "https://example.com",
                "web": "https://example.com"
            }
        ]
}

Response Formatter

  • name : name of the brief

  • date : date on which specific brief was published

  • slug : brief slug of bookmarked brief

  • gid : gid of bookmarked brief document

  • bookmarked : boolean value (will always be true)

GET Bookmarked Article

This endpoint allows you to retrieve all of the bookmarked articles.

Note

This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.

Warning

It is compulsory to have prefix Bearer on Authorization header.

Request

URL : /bookmark/article

Method : GET

Example

curl --location  'https://platform-test.ranenetwork.com/public-api/v1/bookmark/article' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data ''

Response

{
    "data":[
            {
                "category": null,
                "title": "Executive Summary",
                "gid": "editorial_note",
                "sources": [],
                "snippet": "<p>All the news related to Cyber Related topics.</p>",
                "liked": true,
                "bookmarked": true,
                "share": "mailto:?subject=RANE%20Brief%3A%20Editorial%20Note&body=Editorial%20Note%0A%0A%3Cp%3EAll%20the%20news%20related%20to%20Cyber%20Related%20topics.%3C%2Fp%3E%0A%0A%0A%0A",
                "brief": {
                    "name": "Cyber Digest",
                    "slug": "cyber-digest",
                    "gid": "8-1836210",
                    "date": "October 13 2023"
                }
            }
        ]
}

Response Formatter

  • category : category that article was linked to at time of publication

  • title : title of article

  • gid : gid of the specific article that’s been bookmarked

  • sources : sources relevant to the article

  • snippet : snippet/content on specific article

  • liked : identifies whether content is liked/disliked

  • bookmarked : boolean value (will always be true)

  • share : mail to link for that article

  • brief : explanatory response (all the fields represent same value as mentioned on above “briefs” section”

DELETE Bookmarked Brief

This endpoint allows you to remove a specific brief from bookmark.

Note

This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.

Warning

It is compulsory to have prefix Bearer on Authorization header.

Request

URL : /bookmark/<brief-slug>/<brief-gid>

Method : DELETE

Example

curl --location --request DELETE 'https://platform-test.ranenetwork.com/public-api/v1/bookmark/cyber-digest/8-1836210' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>'

Response

 {
    "data":[
        {
            "url": "brief:8-1836210",
            "brief_gid": "8-1836210",
            "brief_slug": "cyber-digest"
        }
    ]
}

Response Formatter

  • data : exactly deleted data that can be used for undo operation if needed

DELETE Bookmarked Article

This endpoint allows you to remove a specific article published on specific brief from bookmark.

Note

This API requires you to have a access token that should be obtained following Authorization Section. If not obtained please follow the Authorization section to correctly obtain one.

Warning

It is compulsory to have prefix Bearer on Authorization header.

Request

URL : /bookmark/<brief-slug>/<brief-gid>/<article-gid>

Method : DELETE

Example

curl --location --request DELETE 'https://platform-test.ranenetwork.com/public-api/v1/bookmark/cyber-digest/8-1836210/editorial_note' \
--header 'Content-type: application/json' \
--header 'Authorization: Bearer <access_token>'

Response

 {
    "data":[
        {
            "url": "brief:8-1836210/article:editorial_note",
            "brief_gid": "8-1836210",
            "article_gid":"editorial_note",
            "brief_slug": "cyber-digest"
        }
    ]
}

Response Formatter

  • data : exactly deleted data that can be used for undo operation if needed