-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for reading user profiles
- Loading branch information
1 parent
44ff5e9
commit 2411de3
Showing
3 changed files
with
78 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
require "time" | ||
|
||
module Threads | ||
module API | ||
class Profile | ||
attr_reader :id, :username, :profile_picture_url, :biography | ||
|
||
def initialize(json) | ||
@id = json["id"] | ||
@username = json["username"] | ||
@profile_picture_url = json["profile_picture_url"] | ||
@biography = json["biography"] | ||
end | ||
|
||
alias_method :bio, :biography | ||
end | ||
end | ||
end |
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