Skip to content

Commit

Permalink
Update document for models
Browse files Browse the repository at this point in the history
  • Loading branch information
parroty committed Jan 23, 2015
1 parent 2f2ab4c commit 5bc16bb
Showing 1 changed file with 30 additions and 6 deletions.
36 changes: 30 additions & 6 deletions lib/extwitter/model.ex
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
defmodule ExTwitter.Model.Cursor do
defstruct items: nil, next_cursor: nil, previous_cursor: nil

@type t :: %__MODULE__{}
end

defmodule ExTwitter.Model.Tweet do
@moduledoc """
Tweet object.
## Reference
https://dev.twitter.com/overview/api/tweets
"""
defstruct contributors: nil, coordinates: nil, created_at: nil, entities: nil,
favorite_count: nil, favorited: nil, geo: nil, id: nil, id_str: nil,
in_reply_to_screen_name: nil, in_reply_to_status_id: nil,
Expand All @@ -17,6 +17,12 @@ defmodule ExTwitter.Model.Tweet do
end

defmodule ExTwitter.Model.User do
@moduledoc """
User object.
## Reference
https://dev.twitter.com/overview/api/users
"""
defstruct contributors_enabled: nil, created_at: nil, default_profile: nil,
default_profile_image: nil, description: nil, entities: nil,
favourites_count: nil, follow_request_sent: nil, followers_count: nil,
Expand All @@ -37,6 +43,12 @@ defmodule ExTwitter.Model.User do
end

defmodule ExTwitter.Model.Entities do
@moduledoc """
Entities object.
## Reference
https://dev.twitter.com/overview/api/entities
"""
defstruct hashtags: nil, symbols: nil, urls: nil, user_mentions: nil

@type t :: %__MODULE__{}
Expand All @@ -57,6 +69,12 @@ defmodule ExTwitter.Model.List do
end

defmodule ExTwitter.Model.Place do
@moduledoc """
Place object.
## Reference
https://dev.twitter.com/overview/api/places
"""
defstruct id: nil, url: nil, place_type: nil, name: nil, full_name: nil,
country_code: nil, country: nil, contained_within: nil,
bounding_box: nil, attributes: nil
Expand Down Expand Up @@ -87,3 +105,9 @@ defmodule ExTwitter.Model.StallWarning do

@type t :: %__MODULE__{}
end

defmodule ExTwitter.Model.Cursor do
defstruct items: nil, next_cursor: nil, previous_cursor: nil

@type t :: %__MODULE__{}
end

0 comments on commit 5bc16bb

Please sign in to comment.