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
737a5a105dcf
parent
23adb15c0a18
branch
dclinton

Added the builder for the search Results object.

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
c05ccbbb1d5c
    // location to 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
c05ccbbb1d5c
  }
56
c05ccbbb1d5c
}
57
c05ccbbb1d5c
58
c05ccbbb1d5c
message Status {
59
c05ccbbb1d5c
  // timestamp of element creation, either status or user
60
c05ccbbb1d5c
  optional string created_at = 1;
61
c05ccbbb1d5c
  // a permanent unique id referencing an object, such as user or status
62
c05ccbbb1d5c
  optional uint64 id = 2;
63
c05ccbbb1d5c
  // escaped and HTML encoded status body
64
c05ccbbb1d5c
  optional string text = 3;
65
c05ccbbb1d5c
  // application that sent a status
66
c05ccbbb1d5c
  optional string source = 4;
67
c05ccbbb1d5c
  // boolean indicating if a status required shortening
68
c05ccbbb1d5c
  optional bool truncated = 5;
69
c05ccbbb1d5c
  // unique id for the status a status replies to (see id)
70
c05ccbbb1d5c
  optional uint64 in_reply_to_status_id = 6;
71
c05ccbbb1d5c
  // unique id for the user that wrote the status a status replies to (see id)
72
c05ccbbb1d5c
  optional uint64 in_reply_to_user_id = 7;
73
c05ccbbb1d5c
  // boolean indicating if a status has been marked as a favorite
74
c05ccbbb1d5c
  optional bool favorited = 8;
75
c05ccbbb1d5c
  optional User user = 9;
76
c05ccbbb1d5c
}
77
c05ccbbb1d5c
78
c05ccbbb1d5c
message DirectMessage {
79
c05ccbbb1d5c
  // a permanent unique id referencing an object, such as user or status
80
c05ccbbb1d5c
  optional uint64 id = 1;
81
c05ccbbb1d5c
  // escaped and HTML encoded status body
82
c05ccbbb1d5c
  optional string text = 2;
83
c05ccbbb1d5c
  // unique id of the user that sent a direct message (see id)
84
c05ccbbb1d5c
  optional uint64 sender_id = 3;
85
c05ccbbb1d5c
  // unique id of the user that received a direct message (see id)
86
c05ccbbb1d5c
  optional uint64 recipient_id = 4;
87
c05ccbbb1d5c
  // timestamp of element creation, either status or user
88
c05ccbbb1d5c
  optional string created_at = 5;
89
c05ccbbb1d5c
  // display name of the user that sent a direct message (see screen_name)
90
c05ccbbb1d5c
  optional string sender_screen_name = 6;
91
c05ccbbb1d5c
  // display name of the user that sent a direct message (see screen_name)
92
c05ccbbb1d5c
  optional string recipient_screen_name = 7;
93
c05ccbbb1d5c
  optional User sender = 8;
94
c05ccbbb1d5c
  optional User recipient = 9;
95
c05ccbbb1d5c
}
96
c05ccbbb1d5c
97
c05ccbbb1d5c
enum Device {
98
c05ccbbb1d5c
  NONE = 0;
99
c05ccbbb1d5c
  SMS = 1;
100
c05ccbbb1d5c
  IM = 2;
101
c05ccbbb1d5c
}
102
c05ccbbb1d5c
103
c05ccbbb1d5c
message Trends {
104
c05ccbbb1d5c
  optional string as_of = 1;
105
c05ccbbb1d5c
  repeated Trend trends = 2;
106
c05ccbbb1d5c
  
107
c05ccbbb1d5c
  message Trend {
108
c05ccbbb1d5c
    optional string name = 1;
109
c05ccbbb1d5c
    optional string url = 2;
110
c05ccbbb1d5c
  }
111
c05ccbbb1d5c
}
112
c05ccbbb1d5c
113
c05ccbbb1d5c
message Results {
114
c05ccbbb1d5c
  optional double completed_in = 1;
115
c05ccbbb1d5c
  optional uint64 max_id = 2;
116
c05ccbbb1d5c
  optional string next_page = 3;
117
c05ccbbb1d5c
  optional uint32 page = 4;
118
c05ccbbb1d5c
  optional string query = 5;
119
c05ccbbb1d5c
  optional string refresh_url = 6;
120
c05ccbbb1d5c
  repeated Result results = 7;
121
23adb15c0a18
  optional uint64 since_id = 8;
122
737a5a105dcf
  optional sint32 results_per_page = 9;
123
737a5a105dcf
 
124
c05ccbbb1d5c
  message Result {
125
c05ccbbb1d5c
    optional string created_at = 1;
126
c05ccbbb1d5c
    optional string from_user = 2;
127
c05ccbbb1d5c
    optional uint64 from_user_id = 3;
128
c05ccbbb1d5c
    optional uint64 id = 4;
129
c05ccbbb1d5c
    optional string iso_language_code = 5;
130
c05ccbbb1d5c
    optional string profile_image_url = 6;
131
c05ccbbb1d5c
    optional string source = 7;
132
c05ccbbb1d5c
    optional string text = 8;
133
c05ccbbb1d5c
    optional string to_user = 9;
134
c05ccbbb1d5c
    optional uint64 to_user_id = 10;
135
737a5a105dcf
    // 'results_per_page' and 'since_id' moved to 
136
737a5a105dcf
    // Results.  Do not reuse slots 11 or 12
137
737a5a105dcf
    // optional sint32 results_per_page = 11;
138
23adb15c0a18
    // optional uint64 since_id = 12;
139
c05ccbbb1d5c
  }
140
c05ccbbb1d5c
}
141
c05ccbbb1d5c
142
c05ccbbb1d5c
message Geocode {
143
c05ccbbb1d5c
  required double latitude = 1;
144
c05ccbbb1d5c
  required double longitude = 2;
145
c05ccbbb1d5c
  required uint32 radius = 3;
146
c05ccbbb1d5c
  required Unit unit = 4;
147
c05ccbbb1d5c
  
148
c05ccbbb1d5c
  enum Unit {
149
c05ccbbb1d5c
    MILES = 0;
150
c05ccbbb1d5c
    KILOMETERS = 1;
151
c05ccbbb1d5c
  }
152
c05ccbbb1d5c
}
153
c05ccbbb1d5c
154
c05ccbbb1d5c
message RateLimitStatus {
155
c05ccbbb1d5c
  // maximum number of API calls a user is allowed in an hour
156
c05ccbbb1d5c
  optional sint32 hourly_limit = 1;
157
c05ccbbb1d5c
  // time when a user's API call allocation resets
158
c05ccbbb1d5c
  optional string reset_time = 2;
159
c05ccbbb1d5c
  // Unix time when a user's API call allocation resets
160
c05ccbbb1d5c
  optional uint64 reset_time_in_seconds = 3;
161
c05ccbbb1d5c
  // number of API calls remaining for a user
162
c05ccbbb1d5c
  optional uint64 remaining_hits = 4;
163
c05ccbbb1d5c
}