-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: get proof media instead of biography
- Loading branch information
Showing
6 changed files
with
62 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
package instagram | ||
|
||
// User contains all the data of a user | ||
type User struct { | ||
ID string `json:"id"` | ||
// UserMedia contains media data | ||
type UserMedia struct { | ||
Username string `json:"username"` | ||
Bio string `json:"biography"` | ||
Caption string `json:"caption"` | ||
} | ||
|
||
// NewUser builds a new User instance | ||
func NewUser(id, username, biography string) *User { | ||
return &User{ | ||
ID: id, | ||
// NewUserMedia builds a new UserMedia instance | ||
func NewUserMedia(username, biography string) *UserMedia { | ||
return &UserMedia{ | ||
Username: username, | ||
Bio: biography, | ||
Caption: biography, | ||
} | ||
} | ||
|
||
// AddUserRequest represents the access token that allows themis to ask profile information from instagram | ||
type AddUserRequest struct { | ||
// AddUserMediaRequest represents the access token that allows themis to ask user media from instagram | ||
type AddUserMediaRequest struct { | ||
AccessToken string `json:"accessToken"` | ||
} |