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

Branch
dclinton
package twitter;

option java_package = "net.unto.twitter";
option java_outer_classname = "TwitterProtos";
       
message User {
  // a permanent unique id referencing an object, such as user or status
  optional uint64 id = 1;
  // full name of a registered user
  optional string name = 2;
  // display name for a user
  optional string screen_name = 3;
  // user specified string representing where they are from
  optional string location = 4;
  // 160 characters or less of text that describes a user
  optional string description = 5;
  optional Profile profile = 6;
  // user's homepage
  optional string url = 7;
  // boolean indicating if a user has a protected profile
  optional bool protected = 8;
  // number of users following a user's updates
  optional uint32 followers_count = 9;
  // number of users a user is following
  optional uint32 friends_count = 10;
  // timestamp of element creation, either status or user
  optional string created_at = 11;
  // number of statuses a user has marked as favorite
  optional uint32 favorites_count = 12;
  // number of seconds between a user's registered time zone and Coordinated Universal Time
  optional sint32 utc_offset = 13;
  // a user's time zone
  optional string time_zone = 14;
  // boolean indicating if a user is following a given user
  optional bool following = 15;
  // boolean indicating if a user is receiving device updates for a given user
  optional bool notifications = 16;
  // the total number of status updates performed by a user, excluding direct messages sent
  optional uint32 statuses_count = 17;
  optional Status status = 18;

  message Profile {
    // location of a user's avatar file
    optional string image_url = 1;
    // hex RGB value for a user's background color
    optional string background_color = 2;
    // hex RGB value for a user's text color
    optional string text_color = 3;
    // hex RGB value for a user's link color
    optional string link_color = 4;
    // hex RGB value for a user's sidebar color
    optional string sidebar_fill_color = 5;
    // hex RGB value for a user's border color   
    optional string sidebar_border_color = 6; 
    // location of a user's background image
    optional string background_image_url = 7;
    // true if the background image tiles
    optional bool background_tile = 8;
  }
}

message Status {
  // timestamp of element creation, either status or user
  optional string created_at = 1;
  // a permanent unique id referencing an object, such as user or status
  optional uint64 id = 2;
  // escaped and HTML encoded status body
  optional string text = 3;
  // application that sent a status
  optional string source = 4;
  // boolean indicating if a status required shortening
  optional bool truncated = 5;
  // unique id for the status a status replies to (see id)
  optional uint64 in_reply_to_status_id = 6;
  // unique id for the user that wrote the status a status replies to (see id)
  optional uint64 in_reply_to_user_id = 7;
  // display name for the user that wrote the status a status replies to (see screen_name)
  optional string in_reply_to_screen_name = 10;
  // boolean indicating if a status has been marked as a favorite
  optional bool favorited = 8;
  optional User user = 9;
}

message DirectMessage {
  // a permanent unique id referencing an object, such as user or status
  optional uint64 id = 1;
  // escaped and HTML encoded status body
  optional string text = 2;
  // unique id of the user that sent a direct message (see id)
  optional uint64 sender_id = 3;
  // unique id of the user that received a direct message (see id)
  optional uint64 recipient_id = 4;
  // timestamp of element creation, either status or user
  optional string created_at = 5;
  // display name of the user that sent a direct message (see screen_name)
  optional string sender_screen_name = 6;
  // display name of the user that sent a direct message (see screen_name)
  optional string recipient_screen_name = 7;
  optional User sender = 8;
  optional User recipient = 9;
}

enum Device {
  NONE = 0;
  SMS = 1;
  IM = 2;
}

message Trends {
  optional string as_of = 1;
  repeated Trend trends = 2;
  
  message Trend {
    optional string name = 1;
    optional string url = 2;
  }
}

message Results {
  optional double completed_in = 1;
  optional uint64 max_id = 2;
  optional string next_page = 3;
  optional uint32 page = 4;
  optional string query = 5;
  optional string refresh_url = 6;
  repeated Result results = 7;
  optional uint64 since_id = 8;
  optional sint32 results_per_page = 9;
 
  message Result {
    optional string created_at = 1;
    optional string from_user = 2;
    optional uint64 from_user_id = 3;
    optional uint64 id = 4;
    optional string iso_language_code = 5;
    optional string profile_image_url = 6;
    optional string source = 7;
    optional string text = 8;
    optional string to_user = 9;
    optional uint64 to_user_id = 10;
    // 'results_per_page' and 'since_id' moved to 
    // Results.  Do not reuse slots 11 or 12
    // optional sint32 results_per_page = 11;
    // optional uint64 since_id = 12;
  }
}

message Geocode {
  required double latitude = 1;
  required double longitude = 2;
  required uint32 radius = 3;
  required Unit unit = 4;
  
  enum Unit {
    MILES = 0;
    KILOMETERS = 1;
  }
}

message RateLimitStatus {
  // maximum number of API calls a user is allowed in an hour
  optional sint32 hourly_limit = 1;
  // time when a user's API call allocation resets
  optional string reset_time = 2;
  // Unix time when a user's API call allocation resets
  optional uint64 reset_time_in_seconds = 3;
  // number of API calls remaining for a user
  optional uint64 remaining_hits = 4;
}

message Relationship {

  message User {
    optional uint64 id = 1; 
    optional string screen_name = 2;
    optional bool following = 3;
    optional bool followed_by = 4;
    optional bool notifications_enabled = 5;
    optional bool blocking = 6;
  }

  optional User source = 1;
  optional User target = 2;
}