xitiomet is sharing code with you

Bitbucket is a code hosting site. Unlimited public and private repositories. Free for small teams.

Don't show this again

xitiomet / python-twitter (fork of saiyr / python-twitter)

Mostly the same, but i added support for Mentions http://apiwiki.twitter.com/Twitter-REST-API-Met...

Clone this repository (size: 393.3 KB): HTTPS / SSH
hg clone https://bitbucket.org/xitiomet/python-twitter
hg clone ssh://hg@bitbucket.org/xitiomet/python-twitter

python-twitter / twitter.proto

commit
77a955c5c388
parent
ad8837d19355
branch
dclinton

Add the missing in_reply_to_screen_name field to the Status protobuf

1
c05ccbbb1d5c
package twitter;
2
c05ccbbb1d5c
3
c05ccbbb1d5c
option java_package = "net.unto.twitter";
4
c05ccbbb1d5c
option java_outer_classname = "TwitterProtos";
5
c05ccbbb1d5c
       
6
c05ccbbb1d5c
message User {
7
c05ccbbb1d5c
  // a permanent unique id referencing an object, such as user or status
8
c05ccbbb1d5c
  optional uint64 id = 1;
9
c05ccbbb1d5c
  // full name of a registered user
10
c05ccbbb1d5c
  optional string name = 2;
11
c05ccbbb1d5c
  // display name for a user
12
c05ccbbb1d5c
  optional string screen_name = 3;
13
c05ccbbb1d5c
  // user specified string representing where they are from
14
c05ccbbb1d5c
  optional string location = 4;
15
c05ccbbb1d5c
  // 160 characters or less of text that describes a user
16
c05ccbbb1d5c
  optional string description = 5;
17
c05ccbbb1d5c
  optional Profile profile = 6;
18
c05ccbbb1d5c
  // user's homepage
19
c05ccbbb1d5c
  optional string url = 7;
20
c05ccbbb1d5c
  // boolean indicating if a user has a protected profile
21
c05ccbbb1d5c
  optional bool protected = 8;
22
c05ccbbb1d5c
  // number of users following a user's updates
23
c05ccbbb1d5c
  optional uint32 followers_count = 9;
24
c05ccbbb1d5c
  // number of users a user is following
25
c05ccbbb1d5c
  optional uint32 friends_count = 10;
26
c05ccbbb1d5c
  // timestamp of element creation, either status or user
27
c05ccbbb1d5c
  optional string created_at = 11;
28
c05ccbbb1d5c
  // number of statuses a user has marked as favorite
29
c05ccbbb1d5c
  optional uint32 favorites_count = 12;
30
c05ccbbb1d5c
  // number of seconds between a user's registered time zone and Coordinated Universal Time
31
c05ccbbb1d5c
  optional sint32 utc_offset = 13;
32
c05ccbbb1d5c
  // a user's time zone
33
c05ccbbb1d5c
  optional string time_zone = 14;
34
c05ccbbb1d5c
  // boolean indicating if a user is following a given user
35
c05ccbbb1d5c
  optional bool following = 15;
36
c05ccbbb1d5c
  // boolean indicating if a user is receiving device updates for a given user
37
c05ccbbb1d5c
  optional bool notifications = 16;
38
c05ccbbb1d5c
  // the total number of status updates performed by a user, excluding direct messages sent
39
c05ccbbb1d5c
  optional uint32 statuses_count = 17;
40
c05ccbbb1d5c
  optional Status status = 18;
41
c05ccbbb1d5c
42
c05ccbbb1d5c
  message Profile {
43
fa53aa14dce8
    // location of a user's avatar file
44
c05ccbbb1d5c
    optional string image_url = 1;
45
c05ccbbb1d5c
    // hex RGB value for a user's background color
46
c05ccbbb1d5c
    optional string background_color = 2;
47
c05ccbbb1d5c
    // hex RGB value for a user's text color
48
c05ccbbb1d5c
    optional string text_color = 3;
49
c05ccbbb1d5c
    // hex RGB value for a user's link color
50
c05ccbbb1d5c
    optional string link_color = 4;
51
c05ccbbb1d5c
    // hex RGB value for a user's sidebar color
52
c05ccbbb1d5c
    optional string sidebar_fill_color = 5;
53
c05ccbbb1d5c
    // hex RGB value for a user's border color   
54
c05ccbbb1d5c
    optional string sidebar_border_color = 6; 
55
fa53aa14dce8
    // location of a user's background image
56
fa53aa14dce8
    optional string background_image_url = 7;
57
fa53aa14dce8
    // true if the background image tiles
58
fa53aa14dce8
    optional bool background_tile = 8;
59
c05ccbbb1d5c
  }
60
c05ccbbb1d5c
}
61
c05ccbbb1d5c
62
c05ccbbb1d5c
message Status {
63
c05ccbbb1d5c
  // timestamp of element creation, either status or user
64
c05ccbbb1d5c
  optional string created_at = 1;
65
c05ccbbb1d5c
  // a permanent unique id referencing an object, such as user or status
66
c05ccbbb1d5c
  optional uint64 id = 2;
67
c05ccbbb1d5c
  // escaped and HTML encoded status body
68
c05ccbbb1d5c
  optional string text = 3;
69
c05ccbbb1d5c
  // application that sent a status
70
c05ccbbb1d5c
  optional string source = 4;
71
c05ccbbb1d5c
  // boolean indicating if a status required shortening
72
c05ccbbb1d5c
  optional bool truncated = 5;
73
c05ccbbb1d5c
  // unique id for the status a status replies to (see id)
74
c05ccbbb1d5c
  optional uint64 in_reply_to_status_id = 6;
75
c05ccbbb1d5c
  // unique id for the user that wrote the status a status replies to (see id)
76
c05ccbbb1d5c
  optional uint64 in_reply_to_user_id = 7;
77
77a955c5c388
  // display name for the user that wrote the status a status replies to (see screen_name)
78
77a955c5c388
  optional string in_reply_to_screen_name = 10;
79
c05ccbbb1d5c
  // boolean indicating if a status has been marked as a favorite
80
c05ccbbb1d5c
  optional bool favorited = 8;
81
c05ccbbb1d5c
  optional User user = 9;
82
c05ccbbb1d5c
}
83
c05ccbbb1d5c
84
c05ccbbb1d5c
message DirectMessage {
85
c05ccbbb1d5c
  // a permanent unique id referencing an object, such as user or status
86
c05ccbbb1d5c
  optional uint64 id = 1;
87
c05ccbbb1d5c
  // escaped and HTML encoded status body
88
c05ccbbb1d5c
  optional string text = 2;
89
c05ccbbb1d5c
  // unique id of the user that sent a direct message (see id)
90
c05ccbbb1d5c
  optional uint64 sender_id = 3;
91
c05ccbbb1d5c
  // unique id of the user that received a direct message (see id)
92
c05ccbbb1d5c
  optional uint64 recipient_id = 4;
93
c05ccbbb1d5c
  // timestamp of element creation, either status or user
94
c05ccbbb1d5c
  optional string created_at = 5;
95
c05ccbbb1d5c
  // display name of the user that sent a direct message (see screen_name)
96
c05ccbbb1d5c
  optional string sender_screen_name = 6;
97
c05ccbbb1d5c
  // display name of the user that sent a direct message (see screen_name)
98
c05ccbbb1d5c
  optional string recipient_screen_name = 7;
99
c05ccbbb1d5c
  optional User sender = 8;
100
c05ccbbb1d5c
  optional User recipient = 9;
101
c05ccbbb1d5c
}
102
c05ccbbb1d5c
103
c05ccbbb1d5c
enum Device {
104
c05ccbbb1d5c
  NONE = 0;
105
c05ccbbb1d5c
  SMS = 1;
106
c05ccbbb1d5c
  IM = 2;
107
c05ccbbb1d5c
}
108
c05ccbbb1d5c
109
c05ccbbb1d5c
message Trends {
110
c05ccbbb1d5c
  optional string as_of = 1;
111
c05ccbbb1d5c
  repeated Trend trends = 2;
112
c05ccbbb1d5c
  
113
c05ccbbb1d5c
  message Trend {
114
c05ccbbb1d5c
    optional string name = 1;
115
c05ccbbb1d5c
    optional string url = 2;
116
c05ccbbb1d5c
  }
117
c05ccbbb1d5c
}
118
c05ccbbb1d5c
119
c05ccbbb1d5c
message Results {
120
c05ccbbb1d5c
  optional double completed_in = 1;
121
c05ccbbb1d5c
  optional uint64 max_id = 2;
122
c05ccbbb1d5c
  optional string next_page = 3;
123
c05ccbbb1d5c
  optional uint32 page = 4;
124
c05ccbbb1d5c
  optional string query = 5;
125
c05ccbbb1d5c
  optional string refresh_url = 6;
126
c05ccbbb1d5c
  repeated Result results = 7;
127
23adb15c0a18
  optional uint64 since_id = 8;
128
737a5a105dcf
  optional sint32 results_per_page = 9;
129
737a5a105dcf
 
130
c05ccbbb1d5c
  message Result {
131
c05ccbbb1d5c
    optional string created_at = 1;
132
c05ccbbb1d5c
    optional string from_user = 2;
133
c05ccbbb1d5c
    optional uint64 from_user_id = 3;
134
c05ccbbb1d5c
    optional uint64 id = 4;
135
c05ccbbb1d5c
    optional string iso_language_code = 5;
136
c05ccbbb1d5c
    optional string profile_image_url = 6;
137
c05ccbbb1d5c
    optional string source = 7;
138
c05ccbbb1d5c
    optional string text = 8;
139
c05ccbbb1d5c
    optional string to_user = 9;
140
c05ccbbb1d5c
    optional uint64 to_user_id = 10;
141
737a5a105dcf
    // 'results_per_page' and 'since_id' moved to 
142
737a5a105dcf
    // Results.  Do not reuse slots 11 or 12
143
737a5a105dcf
    // optional sint32 results_per_page = 11;
144
23adb15c0a18
    // optional uint64 since_id = 12;
145
c05ccbbb1d5c
  }
146
c05ccbbb1d5c
}
147
c05ccbbb1d5c
148
c05ccbbb1d5c
message Geocode {
149
c05ccbbb1d5c
  required double latitude = 1;
150
c05ccbbb1d5c
  required double longitude = 2;
151
c05ccbbb1d5c
  required uint32 radius = 3;
152
c05ccbbb1d5c
  required Unit unit = 4;
153
c05ccbbb1d5c
  
154
c05ccbbb1d5c
  enum Unit {
155
c05ccbbb1d5c
    MILES = 0;
156
c05ccbbb1d5c
    KILOMETERS = 1;
157
c05ccbbb1d5c
  }
158
c05ccbbb1d5c
}
159
c05ccbbb1d5c
160
c05ccbbb1d5c
message RateLimitStatus {
161
c05ccbbb1d5c
  // maximum number of API calls a user is allowed in an hour
162
c05ccbbb1d5c
  optional sint32 hourly_limit = 1;
163
c05ccbbb1d5c
  // time when a user's API call allocation resets
164
c05ccbbb1d5c
  optional string reset_time = 2;
165
c05ccbbb1d5c
  // Unix time when a user's API call allocation resets
166
c05ccbbb1d5c
  optional uint64 reset_time_in_seconds = 3;
167
c05ccbbb1d5c
  // number of API calls remaining for a user
168
c05ccbbb1d5c
  optional uint64 remaining_hits = 4;
169
c05ccbbb1d5c
}