Module Api11

module Api11: sig .. end
HTTP parameters



HTTP parameters


We handle HTTP parameters as (string * string option) list
type params = (string * string option) list 
val (~?) : ('a * 'b option) list -> ('a * 'b) list
Coercing to the normal HTTP header type, (string * string) list.

Base communication

val twitter : Oauth.t ->
?host:string ->
Http.meth ->
string ->
(string * string) list ->
(Api_intf.Json.t, [> `Http of int * string ]) Meta_conv.Result.t
val json_error_wrap : ('a -> [< `Error of 'b | `Ok of 'c ]) ->
[< `Error of [> `Json of 'b ] as 'd | `Ok of 'a ] ->
[> `Error of 'd | `Ok of 'c ]
To live with other errors like `HTTP, Json decoding erros are tagged with `Json.
val api : (Api_intf.Json.t -> [< `Error of 'a | `Ok of 'b ]) ->
Http.meth ->
('c, unit, string,
(string * string option) list ->
Oauth.t ->
[> `Error of [> `Http of int * string | `Json of 'a ] | `Ok of 'b ])
Pervasives.format4 -> 'c
api post meth fmt ...(format args)... params oauth

post : Parser of JSON. If you want to have the raw JSON, use fun x -> `Ok x. meth : GET or POST fmt : piece of path, you can use Printf % format params : the type is params oauth : OAuth value


Argment handling

module Arg: sig .. end

Cursor based API

module Cursor: sig .. end

The API endpoints

module Timelines: sig .. end
module Tweets: sig .. end
module Search: sig .. end
module Streaming: sig .. end
module DirectMessages: sig .. end
module FriendsAndFollowers: 
functor (A : sig
val dir : string
"friends" or "followers"
end) -> sig .. end
module Friends: FriendsAndFollowers(sig
val dir : string
end)
module Followers: FriendsAndFollowers(sig
val dir : string
end)
module Friendships: sig .. end
module Users: sig .. end
module Blocks: sig .. end
module SuggestedUsers: sig .. end
module Favorites: sig .. end
module Lists: sig .. end
module SavedSearches: sig .. end
module PlacesAndGeo: sig .. end
module Trends: sig .. end
module SpamReporting: sig .. end
module OAuth: sig .. end
module Help: sig .. end