forked from yanatan16/golang-instagram
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathresponse.go
More file actions
42 lines (35 loc) · 967 Bytes
/
response.go
File metadata and controls
42 lines (35 loc) · 967 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package instagram
type metaResponse struct {
Meta *Meta
}
// UserResponse is the API response for GetSelf()
type UserResponse struct {
metaResponse
User *User `json:"data"`
}
// PaginatedMediasResponse is the API response for GetRecentMedia()
type PaginatedMediasResponse struct {
metaResponse
Medias []Media `json:"data"`
Pagination MediaPagination
}
// MediaPagination will give you an easy way to request the next page of media.
type MediaPagination struct {
Pagination
}
// CommentsResponse is the API response for GetMediaRecentComments()
type CommentsResponse struct {
metaResponse
Comments []Comment `json:"data"`
}
// Pagination describes how to get the next page of results.
type Pagination struct {
NextURL string `json:"next_url"`
NextMaxID string `json:"next_max_id"`
}
// Meta is the response information.
type Meta struct {
Code int
ErrorType string `json:"error_type"`
ErrorMessage string `json:"error_message"`
}