Page Follow

A Page Follow represents a User following a Page. Following a page allows a user to see public activity feed posts from that page in their activity feed.

Resource URIs

Item URI: /api/0.1/page_follow/{pk}/

Collection URI: /api/0.1/page_follow/

Item

Item Methods

GET Retrieve a Page Follow by id DELETE Remove a Page Follow by id (unfollow)

page A link to the Page that is being followed self A link to this resource user A link to the User resource that owns the Page Follow

Collection

Collection methods

GET Get a list of users that are following a page, get the pages a user is following or determine if a user is following a page. POST Create a follow relationship between a page and a user (follow).

Collection query parameters

Name Description Type Required
page_id The page being followed param_type No
user_id The user following the page param_type No

One of the two parameters is required, though, for any kind of useful response

self A link to this resource

Embedded collections

page_follows A collection of Page Follows with links as described under Item links

Usage

GET Page Follow entity

Request GET: /api/0.1/page_follow/3847030/
Response
{
    "_links": {
        "documentation": [
            {
                "href": "https://developer.underarmour.com/docs/01_Page_Follow/"
            }
        ],
        "page": [
            {
                "href": "/api/0.1/page/1/",
                "id": "1"
            }
        ],
        "self": [
            {
                "href": "/api/0.1/page_follow/5295346/",
                "id": "5295346"
            }
        ],
        "user": [
            {
                "href": "/api/0.1/user/19357095/",
                "id": "19357095"
            }
        ]
    }
}

DELETE Page Follow entity

Request DELETE: /api/0.1/page_follow/{pk}/
Response
204 No Response

GET Page Follow collection

Request GET: /api/0.1/page_follow/?page_id=1234
Response
{
    "_embedded": {
        "page_follows": [
            {
                "_links": {
                    "page": [
                        {
                            "href": "/api/0.1/page/1/",
                            "id": "1"
                        }
                    ],
                    "self": [
                        {
                            "href": "/api/0.1/page_follow/3458687/",
                            "id": "3458687"
                        }
                    ],
                    "user": [
                        {
                            "href": "/api/0.1/user/19357095/",
                            "id": "19357095"
                        }
                    ]
                }
            },
            {
                "_links": {
                    "page": [
                        {
                            "href": "/api/0.1/page/1/",
                            "id": "1"
                        }
                    ],
                    "self": [
                        {
                            "href": "/api/0.1/page_follow/3847030/",
                            "id": "3847030"
                        }
                    ],
                    "user": [
                        {
                            "href": "/api/0.1/user/37676978/",
                            "id": "37676978"
                        }
                    ]
                }
            }
        ]
    },
    "_links": {
        "documentation": [
            {
                "href": "https://developer.underarmour.com/docs/01_Page_Follow/"
            }
        ],
        "self": [
            {
                "href": "/api/0.1/page_follow/?limit=20&page_id=1&offset=0"
            }
        ]
    },
    "total_count": 2
}

GET Page Follow collection that a user is following

Request GET: /api/0.1/page_follow/?user_id=19357095
Response
{
    "_embedded": {
        "page_follows": [
            {
                "_links": {
                    "page": [
                        {
                            "href": "/api/0.1/page/1/",
                            "id": "1"
                        }
                    ],
                    "self": [
                        {
                            "href": "/api/0.1/page_follow/3458687/",
                            "id": "3458687"
                        }
                    ],
                    "user": [
                        {
                            "href": "/api/0.1/user/19357095/",
                            "id": "19357095"
                        }
                    ]
                }
            },
            {
                "_links": {
                    "page": [
                        {
                            "href": "/api/0.1/page/2/",
                            "id": "1"
                        }
                    ],
                    "self": [
                        {
                            "href": "/api/0.1/page_follow/3847030/",
                            "id": "3847030"
                        }
                    ],
                    "user": [
                        {
                            "href": "/api/0.1/user/19357095/",
                            "id": "19357095"
                        }
                    ]
                }
            }
        ]
    },
    "_links": {
        "documentation": [
            {
                "href": "https://developer.underarmour.com/docs/01_Page_Follow/"
            }
        ],
        "self": [
            {
                "href": "/api/0.1/page_follow/?limit=20&page_id=1&offset=0"
            }
        ]
    },
    "total_count": 2

GET Page Follow collection if a user is following a page

Request GET: /api/0.1/page_follow/?page_id=1&user_id=19357095
Response

Returns a single result if the user is following the page, otherwise returns an empty list.

{
    "_embedded": {
        "page_follows": [
            {
                "_links": {
                    "page": [
                        {
                            "href": "/api/0.1/page/2/",
                            "id": "1"
                        }
                    ],
                    "self": [
                        {
                            "href": "/api/0.1/page_follow/3847030/",
                            "id": "3847030"
                        }
                    ],
                    "user": [
                        {
                            "href": "/api/0.1/user/19357095/",
                            "id": "19357095"
                        }
                    ]
                }
            }
        ]
    },
    "_links": {
        "documentation": [
            {
                "href": "https://developer.underarmour.com/docs/01_Page_Follow/"
            }
        ],
        "self": [
            {
                "href": "/api/0.1/page_follow/?limit=20&page_id=1&offset=0"
            }
        ]
    },
    "total_count": 1
}

POST Page Follow entity

Request POST: /api/0.1/page_follow/
{
    "page": "/api/0.1/page/1/",
    "user": "/api/0.1/user/19357095/"
}
Response
{
    "page": "/api/0.1/page/1/",
    "user": "/api/0.1/user/19357095/"
}

PATCH to create multiple Page Follow entities

Request PATCH: /api/0.1/page_follow/
{
  "page_follows": [
    {
      "page": "/api/0.1/page/192/",
      "user": "/v7.0/user/37698697/"
    },
    {
      "page": "/api/0.1/page/195/",
      "user": "/v7.0/user/37698697/"
    }
  ]
}
Response
{
    "page_follows": [
        {
          "resource_uri": "/api/0.1/page_follow/123/",
          "page": "/api/0.1/page/192/",
          "user": "/v7.0/user/37698697/"
        },
        {
          "resource_uri": "/api/0.1/page_follow/345/",
          "page": "/api/0.1/page/195/",
          "user": "/v7.0/user/37698697/"
        }
    ]
}