PageRenderTime 93ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/src/proto/spinn3rApi.proto

https://code.google.com/p/spinn3r-client/
Protocol Buffers | 339 lines | 139 code | 25 blank | 175 comment | 0 complexity | bd138032121d36e0fe153a0c20332ea7 MD5 | raw file
Possible License(s): Apache-2.0
  1. /*
  2. http://code.google.com/p/spinn3r-client/source/checkout
  3. SSH into repo and run:
  4. svn up
  5. protoc --proto_path=src/proto --java_out=src/java src/proto/spinn3rApi.proto
  6. ant compile
  7. svn commit -m "new protobufs"
  8. */
  9. package contentApi;
  10. option java_package = "com.spinn3r.api.protobuf";
  11. option java_outer_classname = "ContentApi";
  12. message Link {
  13. /** The URL of this link */
  14. optional string href = 1;
  15. /** The URL represented in Spinn3r's canonical form */
  16. optional string resource = 2;
  17. /** The mime type of the data returned by this link */
  18. optional string mime_type = 3;
  19. /** The relative query string for this link */
  20. optional string rel = 4;
  21. }
  22. message Lang {
  23. /** The language code */
  24. optional string code = 1;
  25. /** Value between 0.0 and 1.0 indicating the probability the
  26. the language indicated is the language of the content */
  27. optional float probability = 2;
  28. }
  29. message Content {
  30. /** Mime type of this content */
  31. required string mime_type = 1;
  32. /** Bytes of the content */
  33. optional bytes data = 2;
  34. /** Data encoding, usually used for a compression format */
  35. optional string encoding = 3;
  36. }
  37. message Author {
  38. /** Author's name */
  39. optional string name = 1;
  40. /** Author's email */
  41. optional string email = 2;
  42. /** Author's website */
  43. repeated Link link = 3;
  44. }
  45. /**
  46. * TODO: geographic information for this blog. Note that this might need to be
  47. * tied to an author.
  48. */
  49. message Source {
  50. /** Link to source */
  51. repeated Link link = 1;
  52. /** The link that Spinn3r uses to identify this source */
  53. optional Link canonical_link = 2;
  54. /** Title of the source */
  55. optional string title = 3;
  56. /** Source hashcode */
  57. optional string hashcode = 4;
  58. /** Source language */
  59. repeated Lang lang = 5;
  60. /** The Content Management System used to manage this source */
  61. optional string generator = 6;
  62. /** Description of source, provided by the source */
  63. optional string description = 7;
  64. /** Internal */
  65. optional int32 resource_status = 8;
  66. /** The last time spinn3r discovered a new post for this source*/
  67. optional string last_posted = 9;
  68. /** The last time this source published a new post */
  69. optional string last_published = 10;
  70. /** Date that Spinn3r first crawled this source */
  71. optional string date_found = 11;
  72. /** The etag last returned by this source's home page */
  73. optional string etag = 12;
  74. /** The probability that this RSS entry is spam.
  75. Valid values are values between 0.0 and 1.0.
  76. If there is no spam_probability calculated, this
  77. value is set to -1.0. */
  78. optional float spam_probability = 13;
  79. /** Deprecated */
  80. optional sint32 tier = 14;
  81. /** Number of other sources that link to this source */
  82. optional int32 indegree = 15;
  83. /** Publisher category */
  84. optional string publisher_type = 16;
  85. /** Is this publisher disabled? */
  86. optional bool disabled = 17;
  87. /** The vendor that registered this source */
  88. optional string registered_by_vendor = 18;
  89. }
  90. /**
  91. * This message represents an RSS feed
  92. */
  93. message Feed {
  94. /** The links to this feed */
  95. repeated Link link = 1;
  96. /** The link that Spinn3r uses to identify this feed */
  97. optional Link canonical_link = 2;
  98. /** Title of the feed */
  99. optional string title = 3;
  100. /** Hashcode of the feed */
  101. optional string hashcode = 4;
  102. /** Language for the feed */
  103. repeated Lang lang = 5;
  104. /** The Content Management System used to manage this feed */
  105. optional string generator = 6;
  106. /** Description of the feed */
  107. optional string description = 7;
  108. /** Internal */
  109. optional int32 resource_status = 8;
  110. /** Last time Spinn3r discovered a new entry in this feed*/
  111. optional string last_posted = 9;
  112. /** Last time this feed published a new item */
  113. optional string last_published = 10;
  114. /** The date spinn3r first crawled the feed */
  115. optional string date_found = 11;
  116. /** The etag last returned by this feed */
  117. optional string etag = 12;
  118. /** The probability that this RSS entry is spam.
  119. Valid values are values between 0.0 and 1.0.
  120. If there is no spam_probability calculated, this
  121. value is set to -1.0. */
  122. optional float spam_probability = 13;
  123. /** Channel link from RSS feed */
  124. optional Link channel_link = 14;
  125. }
  126. /**
  127. * raw_published:
  128. *
  129. * The raw and opaque string specified by the entry, often in the HTML, which
  130. * represents the time the user/site thinks this story was published. Although
  131. * this MAY be parsable by algorithsm like ISO 8601 or RFC 822, it may not be
  132. * parsable and internalized into a date model. One example is if the site
  133. * omits a timezone. Another is if they only use the day (Jan 1, 1970) and not
  134. * a time.
  135. */
  136. message PermalinkEntry {
  137. /** The URLS of this Permalink Entry */
  138. repeated Link link = 1;
  139. /** The link that Spinn3r uses to identify this permalink entry*/
  140. optional Link canonical_link = 2;
  141. /** The link's title */
  142. optional string title = 3;
  143. /** The hashcode of this entry */
  144. optional string hashcode = 4;
  145. /** The language of this entry */
  146. repeated Lang lang = 5;
  147. /** The author of this entry */
  148. repeated Author author = 6;
  149. /** The category of this entry */
  150. repeated string category = 7;
  151. /** The probability that this RSS entry is spam.
  152. Valid values are values between 0.0 and 1.0.
  153. If there is no spam_probability calculated, this
  154. value is set to -1.0.
  155. */
  156. optional float spam_probability = 8;
  157. /** The date on which this entry was last published or updated */
  158. optional string last_published = 9;
  159. /** Date on which Spinn3r found this entry */
  160. optional string date_found = 10;
  161. /** An opaque identifier */
  162. optional int64 identifier = 11;
  163. /** The content of the entry */
  164. optional Content content = 12;
  165. /** The content of the entry without the chrome */
  166. optional Content content_extract = 13;
  167. /** The Content Management System used to manage this permalink entry */
  168. optional string generator = 14;
  169. /** Internal */
  170. optional string raw_published = 15;
  171. }
  172. /**
  173. * Deprecated
  174. */
  175. message CrawlEntry {
  176. repeated Link link = 1;
  177. optional Link canonical_link = 2;
  178. optional string title = 3;
  179. optional string hashcode = 4;
  180. repeated Lang lang = 5;
  181. repeated Author author = 6;
  182. repeated string category = 7;
  183. optional float spam_probability = 8;
  184. optional string last_published = 9;
  185. optional string date_found = 10;
  186. optional int64 identifier = 11;
  187. optional Content content = 12;
  188. optional Content content_extract = 13;
  189. optional string generator = 14;
  190. optional string raw_published = 15;
  191. optional string domain_hashcode = 16;
  192. optional string subdomain_hashcode = 17;
  193. }
  194. /**
  195. * This message represents an RSS feed item
  196. */
  197. message FeedEntry {
  198. /** The URL to which the entry in the feed points */
  199. repeated Link link = 1;
  200. /** The link which Spinn3r uses to identify this FeedEntry */
  201. optional Link canonical_link = 2;
  202. /** The tile of the entry */
  203. optional string title = 3;
  204. /** The hashcode */
  205. optional string hashcode = 4;
  206. /** The language of the feed entry */
  207. repeated Lang lang = 5;
  208. /** The author of the entry */
  209. repeated Author author = 6;
  210. /** The category of the entry */
  211. repeated string category = 7;
  212. /** The probability that this RSS entry is spam.
  213. Valid values are values between 0.0 and 1.0.
  214. If there is no spam_probability calculated, this
  215. value is set to -1.0. */
  216. optional float spam_probability = 8;
  217. /** The date on which the entry was late updated */
  218. optional string last_published = 9;
  219. /** The date on which Spinn3r first crawled this entry */
  220. optional string date_found = 10;
  221. /** An opaque identifier */
  222. optional int64 identifier = 11;
  223. /** The content of the entry in the feed */
  224. optional Content content = 12;
  225. }
  226. /**
  227. * Entries for the comment api
  228. */
  229. message CommentEntry {
  230. optional string permalink = 1;
  231. optional string permalink_title = 2;
  232. optional string permalink_hashcode = 3;
  233. optional string raw_published = 4;
  234. repeated Link link = 5;
  235. optional string date_found = 6;
  236. optional Content content = 7;
  237. optional string title = 8;
  238. repeated Author author = 9;
  239. optional string date_published = 10;
  240. repeated string tag = 11;
  241. optional string lang = 12;
  242. }
  243. /**
  244. * An entry is a representation of a piece of content
  245. * indexed by Spinn3r.
  246. */
  247. message Entry {
  248. /** The web page from which this piece of content came */
  249. optional Source source = 1;
  250. /** The feed from which we discovered this piece of content.
  251. * This field will not exist if we did not discover this
  252. * piece of content through a RSS feed. */
  253. optional Feed feed = 2;
  254. /** The feed item representing this piece of content.
  255. * This field will not exist if we did not discover this
  256. * piece of content through a RSS feed. */
  257. optional FeedEntry feed_entry = 3;
  258. /** The permalink representation of this content */
  259. optional PermalinkEntry permalink_entry = 4;
  260. /** This entry is only active when using the comment API */
  261. optional CommentEntry comment_entry = 5;
  262. /** Deprecated */
  263. optional CrawlEntry crawl_entry = 6;
  264. /** Deprecated */
  265. optional Content content = 7;
  266. /** Deprecated */
  267. optional Content content_extract = 8;
  268. }
  269. /**
  270. * A response message is a collection of content.
  271. */
  272. message Response {
  273. /** The URL for this result set */
  274. optional string request_url = 1;
  275. /** The URL for the previous result set */
  276. optional string previous_request_url = 2;
  277. /** The URL for the next result set */
  278. optional string next_request_url = 3;
  279. /** The entries for the content. */
  280. repeated Entry entry = 4;
  281. }
  282. /**
  283. *
  284. * Lang:
  285. *
  286. * The twitter/user specified language. This might be incorrect but we like to
  287. * preserve all metadata.
  288. *
  289. * statuses_count:
  290. *
  291. * total number of status updates from this user.
  292. *
  293. */
  294. /*
  295. Tue Sep 01 2009 10:32 AM (burton@tailrank.com): NOTE: this is still in
  296. development but I wanted to preserve this message signature as I believe we're
  297. 90% of the way there to supporting this extension.
  298. message TwitterEntry {
  299. optional uint32 followers = 1;
  300. optional uint32 friends = 2;
  301. optional string location = 3;
  302. optional string profile_image_url = 4;
  303. optional string lang = 5;
  304. optional uint32 statuses_count = 6;
  305. optional bool verified = 7;
  306. }
  307. */