123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641# 1 "lib/github_s.mli"(*
* Copyright (c) 2012-2014 Anil Madhavapeddy <anil@recoil.org>
* Copyright (c) 2013-2016 David Sheets <sheets@alum.mit.edu>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*)(**
{3 {{:https://developer.github.com/v3/}GitHub APIv3} client library}
This library offers thin but natural bindings to GitHub's developer API.
*)(** Modules of this type are returned from the {!Github_core.Make}
functor which may be applied to Cohttp_lwt client libraries in
order to run on Unix, in a browser in Javascript, or as a MirageOS
unikernel. *)moduletypeGithub=sig(** {4 API Concepts} *)exceptionMessageofCohttp.Code.status_code*Github_t.message(** [Message] may be raised by any API call when the GitHub service
returns an unexpected response code. Typical reasons for this
exception are insufficient permissions or missing resources. *)(** Functions corresponding to direct API requests return
{!Response.t} values inside of {!Monad.t} values so that more
information about the request can be made
available. {!Monad.(>>~)} is a convenience operator that lets
you bind directly to the carried value. *)moduleResponse:sigtyperedirect=|TemporaryofUri.t(** The redirection is temporary. *)|PermanentofUri.t(** The redirection is permanent. *)(** [redirect] indicates whether the originally requested
endpoint should continue to be used in the future. *)type'at=private<value:'a;redirects:redirectlist;..>(** ['a t] is an API response containing a payload of type
['a]. {b Do not} refer to this type explicitly as its identity and
representation are subject to change (e.g. a family of object
types may replace it before 3.0). *)valvalue:<value:'a;..>->'a(** [value r] is the payload in response [r]. *)valredirects:<redirects:redirectlist;..>->redirectlist(** [redirects r] is the sequence of redirects prior to response [r]. *)valfinal_resource:redirectlist->redirectoption(** [final_resource rs] is the single redirect, if any redirects
occurred, that describes the overall redirect chain [rs]. If
any redirect [rs] is temporary, [final_resource rs] will be a
temporary redirect to the final URI. If all redirects [rs] are
permanent, [final_resource rs] will be a permanent redirect to
the final URI. *)end(** All API requests are bound through this monad which encapsulates
an Lwt cooperative thread and includes some state which may be
set via {!API} functions. *)moduleMonad:sigtype'at(** ['a t] is an Lwt thread sensitive to GitHub API state. *)valreturn:'a->'at(** [return x] is the value [x] wrapped in a state-sensitive Lwt thread. *)valbind:('a->'bt)->'at->'bt(** [bind m f] is the eventual value of [f] applied to the
contents of [m]. Its argument order is designed for currying. *)valmap:('a->'b)->'at->'bt(** [map f m] is {!bind} [m (fun x -> return (f x))]. Its argument
order is designed for currying. *)val(>>=):'at->('a->'bt)->'bt(** [m >>= f] is [{!bind} f m]. *)val(>|=):'at->('a->'b)->'bt(** [m >|= f] is [{!map} f m]. *)val(>>~):'aResponse.tt->('a->'bt)->'bt(** [m >>~ f] is [m >|= {!Response.value} >>= f]. *)valcatch:(unit->'at)->(exn->'at)->'at(** [catch try with] is the result of trying [try]. If [try]
succeeds, its result is returned. If [try] raises an
exception, [with] is applied to the exception and the result
of [with] is returned. *)valfail:exn->'at(** [fail exn] raises exception [exn] inside of the monad. *)valrun:'at->'aLwt.t(** [run m] is the Lwt thread corresponding to the sequence of API
actions represented by [m]. Once a {!t} has been [run], any
GitHub API state such as associated default security tokens or
declared user agent string will not be available in
subsequently bound functions. *)valembed:'aLwt.t->'at(** [embed lwt] is an Lwt thread lifted into the GitHub API
monad. Its monadic state will be inherited from any monadic
values bound before it. *)end(** Each request to GitHub is made to a specific [Endpoint] in
GitHub's REST-like API. *)moduleEndpoint:sig(** Some endpoints expose resources which change over time and
responses from those endpoints may contain version metadata
which can be used to make low-cost conditional requests
(e.g. cache validation). *)moduleVersion:sigtypet=|Etagofstring(** An entity tag identifier *)|Last_modifiedofstring(** A timestamp conforming to the HTTP-date production *)(** [t] is a version of a resource representation. *)endend(** The [Stream] module provides an abstraction to GitHub's paginated
endpoints. Stream creation does not initiate any network
activity. When requests are made, results are buffered
internally. Streams are not mutable. *)moduleStream:sigtype'at(** ['a t] is a stream consisting roughly of a buffer and a means
to refill it. *)type'aparse=string->'alistLwt.t(** ['a parse] is the type of functions which extract elements
from a paginated response. *)valnext:'at->('a*'at)optionMonad.t(** [next s] is the next element of the stream and a stream
continuation if one exists. The input stream is not
modified. This function offers an efficient, lazy, and uniform
means to iterate over ordered API results which may be too
numerous to fit into a single request/response pair. *)valmap:('a->'blistMonad.t)->'at->'bt(** [map f s] is the lazy stream of [f] applied to elements of [s]
as they are demanded. *)valfold:('a->'b->'aMonad.t)->'a->'bt->'aMonad.t(** [fold f a s] is the left fold of [f] over the elements of [s]
with a base value of [a]. {b Warning:} this function may
result in {i many} successive API transactions. *)valfind:('a->bool)->'at->('a*'at)optionMonad.t(** [find p s] is the first value in [s] satisfying [p] if one
exists and a stream continuation for further ingestion. *)valiter:('a->unitMonad.t)->'at->unitMonad.t(** [iter f s] is activated after the application of [f] to each
element of [s]. *)valto_list:'at->'alistMonad.t(** [to_list s] is a list with each element of [s]. {b Warning:}
this function may result in {i many} successive API transactions. *)valof_list:'alist->'at(** [of_list l] is a stream with each element of [l].
Occasionally, it is useful to write interfaces which operate
generically on streams. [of_list] allows you to use list
values with those interfaces. *)valpoll:'at->'atoptionMonad.t(** [poll stream] is a stream with items newer than [stream]'s
items and will not resolve until any timeouts indicated by
GitHub have elapsed. By default, GitHub throttles polling
requests to once per minute per URL endpoint. *)valsince:'at->Endpoint.Version.t->'at(** [since stream version] is [stream] with [version] but without
any other change, i.e. the stream is not reset to its
beginning. Used in conjunction with [poll], [since] enables
low-cost conditional re-synchronization of local state with
GitHub state. *)valversion:'at->Endpoint.Version.toption(** [version stream] is the version of [stream] if one is
known. After any stream element is forced, the stream version
will be available unless GitHub violates its API specification. *)endtyperate=Core|Search(**)(** [rate] is a type used to indicate which
{{:https://developer.github.com/v3/#rate-limiting}rate-limiting
regime} is to be used for query quota accounting. [rate] is used
by the function in {!API}. *)type'aauthorization=|Resultof'a|Two_factorofstring(**)(** Some results may require 2-factor authentication. [Result]
values do not. [Two_factor] values contain the mode by which a
2FA code will be delivered. This code is required as [?otp] to
a subsequent invocation of the function which returns this
type. *)type+'aparse=string->'aLwt.t(** ['a parse] is the type of functions which extract meaningful
values from GitHub responses. *)type'ahandler=(Cohttp.Response.t*string->bool)*'a(** ['a handler] is the type of response handlers which consist of
an activation predicate (fst) and a parse function (snd). *)vallog_active:boolref(** [log_active] regulates debug messages. It is [true] by default
when the environment variable [GITHUB_DEBUG] is set to 1. *)(** The [Scope] module abstracts GitHub's
{{:https://developer.github.com/v3/oauth/#scopes}authorization
scopes}. *)moduleScope:sigvalto_string:Github_t.scope->string(** [to_string scope] is the string GitHub uses to indicate
the scope constructor [scope]. *)valof_string:string->Github_t.scopeoption(** [scope_of_string scope] is the constructor corresponding to
the GitHub scope constructor [scope] if one exists. *)vallist_to_string:Github_t.scopelist->string(** [string_of_scopes scopes] is the serialization for a list of
scopes [scopes] which GitHub accepts as a set of scopes in its
API. *)vallist_of_string:string->Github_t.scopelistoption(** [scopes_of_string scopes] are the scope constructors
corresponding to the serialized list of constructors
[scopes]. *)valall:Github_t.scopelist(** [all] is a list containing every scope constructor known. *)valmax:Github_t.scopelist(** [max] is a list containing the mimimum scope constructors
needed to enable full privilege. *)end(** The [Token] module manipulates authorization tokens. GitHub has
two types of tokens:
{{:https://developer.github.com/v3/oauth/}OAuth application
tokens} and
{{:https://help.github.com/articles/creating-an-access-token-for-command-line-use/}"personal
tokens"}.
@see <https://developer.github.com/v3/oauth_authorizations/> OAuth Authorizations API
*)moduleToken:sigtypet(** [t] is the abstract type of a token. *)valof_code:client_id:string->client_secret:string->code:string->unit->toptionLwt.t(** [of_code ~client_id ~client_secret ~code ()] is the {!t}
granted by a [code] from an
{{:https://developer.github.com/v3/oauth/#github-redirects-back-to-your-site}OAuth
web flow redirect}. *)valcreate:?scopes:Github_t.scopelist->?note:string->?note_url:string->?client_id:string->?client_secret:string->?fingerprint:string->?otp:string->user:string->pass:string->unit->Github_t.authauthorizationResponse.tMonad.t(** [create ?otp ~user ~pass ()] is a new authorization with the
provided fields. When a user has enabled two-factor
authentication, the return value will be a {!const:Two_factor}
constructor with the one-time password delivery
mode. Including a valid [?otp] will yield a {!const:Result} return
value. *)valget_all:?otp:string->user:string->pass:string->unit->Github_t.authsauthorizationResponse.tMonad.t(** [get_all ~user ~pass ()] are all of the authorizations that
this user has made. See {!create} for an explanation of how
two-factor authentication is handled. *)valget:?otp:string->user:string->pass:string->id:int64->unit->Github_t.authoptionauthorizationResponse.tMonad.t(** [get ~user ~pass ~id ()] is the authorization with identifier
[id]. See {!create} for an explanation of how two-factor
authentication is handled. *)valdelete:?otp:string->user:string->pass:string->id:int64->unit->unitauthorizationResponse.tMonad.t(** [delete ~user ~pass ~id ()] is [Result ()] after the
authorization with identifier [id] has been removed. See
{!create} for an explanation of how two-factor authentication
is handled. *)valof_auth:Github_t.auth->t(** [of_auth auth] is the OAuth application or personal token
contained within [auth]. *)valof_string:string->t(** [of_string token_string] is the abstract token value
corresponding to the string [token_string]. *)valto_string:t->string(** [to_string token] is the string serialization of [token]. *)end(** The [API] module contains functionality that relates to the
entirety of the GitHub API and these bindings. In particular,
this module contains:
- {{:https://developer.github.com/v3/#http-verbs}generic accessor functions},
not normally used directly, but useful if you wish to invoke
API endpoints not yet bound.
- handler constructors to help with using the generic accessors
- monad state injectors for setting things like default tokens or
user agent strings
- cached, rate limit queries
- error message utility functions
*)moduleAPI:sigvalcode_handler:expected_code:Cohttp.Code.status_code->'a->'ahandler(** [code_handler ~expected_code parse] is a response handler that
fires for responses with status [expected_code] and applies
[parse]. *)valget:?rate:rate->?fail_handlers:'aparsehandlerlist->?expected_code:Cohttp.Code.status_code->?media_type:string->?headers:Cohttp.Header.t->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [get ?rate ?fail_handlers ?expected_code ?headers ?token
?params uri p] is the [p]-parsed response to a GitHub API HTTP
GET request to [uri] with extra query parameters [params] and
extra headers [headers]. If [token] is supplied, it will be
used instead of any token bound into the monad. [p] will only
fire if the response status is [expected_code] which defaults
to [200 OK]. If the response status is not [expected_code],
[fail_handlers], if any, will be checked in the order
supplied. The [rate] parameter determines which rate limit
accounting regime will be used for caching rate limit values
in response headers. *)valget_stream:?rate:rate->?fail_handlers:'aStream.parsehandlerlist->?expected_code:Cohttp.Code.status_code->?media_type:string->?headers:Cohttp.Header.t->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aStream.parse->'aStream.t(** [get_stream uri stream_p] is the {!Stream.t} encapsulating
lazy [stream_p]-parsed responses to GitHub API HTTP GET
requests to [uri] and
{{:https://developer.github.com/v3/#pagination}its
successors}. For an explanation of the other
parameters, see {!get}. *)valpost:?rate:rate->?fail_handlers:'aparsehandlerlist->expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?body:string->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [post uri p] is the [p]-parsed response to a GitHub API HTTP
POST request to [uri]. For an explanation of the other
parameters, see {!get}. *)valdelete:?rate:rate->?fail_handlers:'aparsehandlerlist->?expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [delete uri p] is the [p]-parsed response to a GitHub API HTTP
DELETE request to [uri]. For an explanation of the other
parameters, see {!get}. *)valpatch:?rate:rate->?fail_handlers:'aparsehandlerlist->expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?body:string->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [patch uri p] is the [p]-parsed response to a GitHub API HTTP
PATCH request to [uri]. For an explanation of the other
parameters, see {!get}. *)valput:?rate:rate->?fail_handlers:'aparsehandlerlist->expected_code:Cohttp.Code.status_code->?headers:Cohttp.Header.t->?body:string->?token:Token.t->?params:(string*string)list->uri:Uri.t->'aparse->'aResponse.tMonad.t(** [put uri p] is the [p]-parsed response to a GitHub API HTTP
PUT request to [uri]. For an explanation of the other
parameters, see {!get}. *)valset_user_agent:string->unitMonad.t(** [set_user_agent ua] contains monadic state that will cause
bound requests to use the [User-Agent] header value of [ua]. *)valset_token:Token.t->unitMonad.t(** [set_token token] contains monadic state that will cause bound
requests to use [token] for authentication by default. This
function enables the creation of large, generic monadic
compositions that do not have to be parameterized by
authentication token. *)valget_rate:?rate:rate->?token:Token.t->unit->Github_t.rateMonad.t(** [get_rate ?rate ()] is the, possibly cached, rate limit
information for the rate limit regime [?rate] (default {!const:Core}). *)valget_rate_limit:?token:Token.t->unit->intMonad.t(** [get_rate_limit ()] is the, possibly cached, {!const:Core} total request
quota for the current token. *)valget_rate_remaining:?token:Token.t->unit->intMonad.t(** [get_rate_remaining ()] is the, possibly cached, {!const:Core} remaining
request quota for the current token. *)valget_rate_reset:?token:Token.t->unit->floatMonad.t(** [get_rate_reset ()] is the, possibly cached, {!const:Core} UNIX
epoch expiry time (s) when the remaining request quota will be
reset to the total request quota for the current token. *)valstring_of_message:Github_t.message->string(** [string_of_message message] is the English language error
message that GitHub generated in [message]. *)end(** The [URI] module contains URI generation functions which may be
useful for linking on the Web or passing to other GitHub API
clients. *)moduleURI:sigvalauthorizations:Uri.t(** The API endpoint for creating and retrieving authorizations. *)valauthorize:?scopes:Github_t.scopelist->?redirect_uri:Uri.t->client_id:string->state:string->unit->Uri.t(** [authorize ?scopes ?redirect_uri ~client_id ~state ()] is the
URL to
{{:https://developer.github.com/v3/oauth/#redirect-users-to-request-github-access}redirect
users} to in an OAuth2 flow to create an authorization
token. [?redirect_url] is the URL in your Web application
where users will be sent after authorization. If omitted, it
will default to the callback URL in GitHub's OAuth application
settings. The [state] parameter should match the callback
state parameter in order to protect against CSRF. *)valtoken:client_id:string->client_secret:string->code:string->unit->Uri.t(** [token ~client_id ~client_secret ~code ()] is the API endpoint
used by {!Token.of_code} to finish the OAuth2 web flow and
convert a temporary OAuth code into a real API access token. *)end(** The [Filter] module contains types used by search and
enumeration interfaces which describe ways to perform result
filtering directly in the GitHub API. *)moduleFilter:sigtypestate=[`All|`Open|`Closed](** [state] is the activation state of a pull request, milestone,
or issue. See {!Pull.for_repo}, {!Milestone.for_repo}, and
{!Issue.for_repo}. *)typemilestone_sort=[`Due_date|`Completeness](** [milestone_sort] is the field by which to sort a collection of
milestones. See {!Milestone.for_repo}. *)typeissue_sort=[`Created|`Updated|`Comments](** [issue_sort] is the field by which to sort a collection of
issues. See {!Issue.for_repo}. *)typeissue_comment_sort=[`Created|`Updated](** [issue_comment_sort] is the field by which to sort a collection of
issue comments. See {!Issue.comments_for_repo}. *)typerepo_sort=[`Stars|`Forks|`Updated](** [repo_sort] is the field by which to sort a collection of
repositories. See {!Search.repos}. *)typeforks_sort=[`Newest|`Oldest|`Stargazers](** [forks_sort] is the bias used when sorting a collection of
forks. See {!Repo.forks}. *)typedirection=[`Asc|`Desc](** [direction] is the sortation precedence. *)typemilestone=[`Any|`None|`Numofint](** [milestone] is the filter predicate for issues. See
{!Issue.for_repo}. *)typeuser=[`Any|`None|`Loginofstring](** [user] is the filter predicate for issues. See
{!Issue.for_repo}. *)type'arange=[|`Rangeof'aoption*'aoption|`Ltof'a|`Lteof'a|`Eqof'a|`Gteof'a|`Gtof'a](** ['a range] is the type of range expressions in search
queries. [`Range] is inclusive. See {!qualifier}. *)typerepo_field=[|`Name|`Description|`Readme](** [repo_field] is a repository search field selector. See [`In]
in {!qualifier}. *)typedate=string(** [date] is the YYYY-MM-DD representation of a day. *)typeissue_qualifier=[|`Authorofstring|`Assigneeofstring|`Mentionsofstring|`Commenterofstring|`Involvesofstring|`Teamofstring|`Labelofstring|`Without_labelofstring|`Languageofstring|`Createdofdaterange|`Updatedofdaterange|`Mergedofdaterange|`Closedofdaterange|`Userofstring|`Repoofstring|`Projectofstring](** [issue_qualifier] is the type of issue search query predicates. *)typequalifier=[|`Inofrepo_fieldlist|`Sizeofintrange|`Starsofintrange|`Forksofintrange|`Forkof[`True|`Only]|`Createdofdaterange|`Pushedofdaterange|`Userofstring|`Languageofstring](** [qualifier] is the type of repository search query predicates. *)end(** {4 API Modules} *)(** The [Rate_limit] module contains explicit rate limit API request
functions which do not {i read} the rate limit cache but do {i
write} to it. *)moduleRate_limit:sigvalall:?token:Token.t->unit->Github_t.rate_resourcesMonad.t(** [all ()] is the current token's rate limit information for all
rate limiting regimes. *)valfor_core:?token:Token.t->unit->Github_t.rateMonad.t(** [for_core ()] is the current token's rate limit information
for the {!const:Core} rate limit regime. *)valfor_search:?token:Token.t->unit->Github_t.rateMonad.t(** [for_search ()] is the current token's rate limit information
for the {!const:Search} rate limit regime. *)end(** The [User] module provides basic user information query functions. *)moduleUser:sigvalcurrent_info:?token:Token.t->unit->Github_t.user_infoResponse.tMonad.t(** [current_info ()] is the user information linked to the
current token. *)valinfo:?token:Token.t->user:string->unit->Github_t.user_infoResponse.tMonad.t(** [info ~user ()] is the user information for user [user]. *)valrepositories:?token:Token.t->user:string->unit->Github_t.repositoryStream.t(** [repositories ~user ()] is a stream of user [user]'s repositories. *)end(** The [Organization] module exposes the functionality of the
GitHub {{:https://developer.github.com/v3/orgs/}organization
API}. *)moduleOrganization:sigvalteams:?token:Token.t->org:string->unit->Github_t.teamStream.t(** [teams ~org ()] is a stream of teams belonging to the
organization [org]. *)valuser_orgs:?token:Token.t->user:string->unit->Github_t.orgStream.t(** [user_orgs ~user ()] is a stream of the organizations
to which the user [user] belongs. *)(** The [Hook] module provides access to GitHub's
{{:https://developer.github.com/v3/orgs/hooks/}organization
webhooks API} which lets you manage an organization's
remote notification hooks. *)moduleHook:sigvalfor_org:?token:Token.t->org:string->unit->Github_t.hookStream.t(** [for_org ~org ()] is a stream of hooks for the organization [org]. *)valget:?token:Token.t->org:string->id:int64->unit->Github_t.hookResponse.tMonad.t(** [get ~org ~id ()] is hook [id] for organization [org]. *)valcreate:?token:Token.t->org:string->hook:Github_t.new_hook->unit->Github_t.hookResponse.tMonad.t(** [create ~org ~hook ()] is a newly created post-receive
hook for organization [org] as described by [hook]. *)valupdate:?token:Token.t->org:string->id:int64->hook:Github_t.update_hook->unit->Github_t.hookResponse.tMonad.t(** [update ~org ~id ~hook ()] is the updated hook [id] for
organization [org] as described by [hook]. *)valdelete:?token:Token.t->org:string->id:int64->unit->unitResponse.tMonad.t(** [delete ~org ~id ()] activates after hook [id] in
organization [org] has been deleted. *)valtest:?token:Token.t->org:string->id:int64->unit->unitResponse.tMonad.t(** [test ~org ~id ()] activates after a [push] event for
the lastest push for organization [org] has been synthesized and
sent to hook [id]. *)valparse_event:constr:string->payload:string->unit->Github_t.event_hook_constr(** [parse_event ~constr ~payload ()] is the event with
constructor [constr] that is represented by [payload]. *)valparse_event_metadata:payload:string->unit->Github_t.event_hook_metadata(** [parse_event_metadata ~payload ()] is the event metadata for
the serialized event [payload]. *)endend(** The [Team] module contains functionality relating to GitHub's
{{:https://developer.github.com/v3/orgs/teams/}team API}. *)moduleTeam:sigvalinfo:?token:Token.t->id:int64->unit->Github_t.team_infoResponse.tMonad.t(** [info ~id ()] is a description of team [id]. *)valrepositories:?token:Token.t->id:int64->unit->Github_t.repositoryStream.t(** [repositories ~id ()] is a stream of repositories belonging
to team [id]. *)end(** The [Event] module exposes GitHub's
{{:https://developer.github.com/v3/activity/events/}event API}
functionality. *)moduleEvent:sigvalfor_repo:?token:Token.t->user:string->repo:string->unit->Github_t.eventStream.t(** [for_repo ~user ~repo ()] is a stream of all events for
[user]/[repo]. *)valpublic_events:unit->Github_t.eventStream.t(** [public_events ()] is a stream of all public events on GitHub. *)valfor_network:?token:Token.t->user:string->repo:string->unit->Github_t.eventStream.t(** [for_network ~user ~repo ()] is a stream of all events for the
fork network containing [user]/[repo]. *)valfor_org:?token:Token.t->org:string->unit->Github_t.eventStream.t(** [for_org ~org ()] is a stream of all events for the
organization [org]. *)valfor_org_member:?token:Token.t->user:string->org:string->unit->Github_t.eventStream.t(** [for_org_member ~user ~org ()] is a stream of [org] events
which [user] receives. *)valreceived_by_user:?token:Token.t->user:string->unit->Github_t.eventStream.t(** [received_by_user ~user ()] is a stream of all of the events
[user] receives. If the current token is for [user], public
and private events will be returned. If not, only public
events will be returned. *)valreceived_by_user_public:?token:Token.t->user:string->unit->Github_t.eventStream.t(** [received_by_user_public ~user ()] is a stream of the public
events [user] receives. *)valfor_user:?token:Token.t->user:string->unit->Github_t.eventStream.t(** [for_user ~user ()] is a stream of the events generated by
[user]. If the current token is for [user], public and private
events will be returned. If not, only public events will be
returned. *)valfor_user_public:?token:Token.t->user:string->unit->Github_t.eventStream.t(** [for_user_public ~user ()] is a stream of the public events
generated by [user]. *)end(** The [Repo] module offers the functionality of GitHub's
{{:https://developer.github.com/v3/repos/}repository API}. *)moduleRepo:sigvalcreate:?token:Token.t->?organization:string->repo:Github_t.new_repo->unit->Github_t.repositoryResponse.tMonad.t(** [create ?organization new_repo ()] is a new repository owned
by the user or organizations if it's provided. *)valinfo:?token:Token.t->user:string->repo:string->unit->Github_t.repositoryResponse.tMonad.t(** [info ~user ~repo ()] is a description of repository [user]/[repo]. *)valfork:?token:Token.t->?organization:string->user:string->repo:string->unit->Github_t.repositoryResponse.tMonad.t(** [fork ?organization ~user ~repo ()] is a newly forked
repository from [user]/[repo] to the current token's user or
[organization] if it's provided. *)valforks:?token:Token.t->?sort:Filter.forks_sort->user:string->repo:string->unit->Github_t.repositoryStream.t(** [forks ?sort ~user ~repo ()] is a stream of all repositories
forked from [user]/[repo] sorted by [?sort] (default [`Newest]). *)valget_tag:?token:Token.t->user:string->repo:string->sha:string->unit->Github_t.tagResponse.tMonad.t(** [get_tag ~user ~repo ~sha ()] is the annotated tag object with
SHA [sha] in [user]/[repo]. *)valtags:?token:Token.t->user:string->repo:string->unit->Github_t.repo_tagStream.t(** [tags ~user ~repo ()] is a stream of all tags in repo [user]/[repo]. *)valget_tags_and_times:?token:Token.t->user:string->repo:string->unit->(string*string)Stream.t(** [get_tags_and_times ~user ~repo ()] is a stream of pairs of
tag names and creation times for all lightweight and annotated
tags in [user]/[repo]. *)valbranches:?token:Token.t->user:string->repo:string->unit->Github_t.repo_branchStream.t(** [branches ~user ~repo ()] is a stream of all branches in repo
[user]/[repo]. *)valrefs:?token:Token.t->?ty:string->user:string->repo:string->unit->Github_t.git_refStream.t(** [refs ?ty ~user ~repo ()] is a stream of all
{{:https://developer.github.com/v3/git/refs/}git references}
with prefix [?ty] for repo [user]/[repo]. *)valget_ref:?token:Token.t->user:string->repo:string->name:string->unit->Github_t.git_refResponse.tMonad.t(** [get_ref ~user ~repo ~name] is the
{{:https://developer.github.com/v3/git/refs/}git reference}
with name [name] for repo [user]/[repo]. *)valget_commit:?token:Token.t->user:string->repo:string->sha:string->unit->Github_t.commitResponse.tMonad.t(** [get_commit ~user ~repo ~sha ()] is commit [sha] in [user]/[repo]. *)valcontributors:?token:Token.t->user:string->repo:string->unit->Github_t.contributorStream.t(** [contributors ~user ~repo ()] is a stream of contributors to
repo [user]/[repo]. *)valdelete:?token:Token.t->user:string->repo:string->unit->unitResponse.tMonad.t(** [delete ~user ~repo ()] activates after repo [user]/[repo] has
been deleted. *)(** The [Hook] module provides access to GitHub's
{{:https://developer.github.com/v3/repos/hooks/}webhooks API}
which lets you manage a repository's post-receive hooks. *)moduleHook:sigvalfor_repo:?token:Token.t->user:string->repo:string->unit->Github_t.hookStream.t(** [for_repo ~user ~repo ()] is a stream of hooks for repo
[user]/[repo]. *)valget:?token:Token.t->user:string->repo:string->id:int64->unit->Github_t.hookResponse.tMonad.t(** [get ~user ~repo ~id ()] is hook [id] for repo [user]/[repo]. *)valcreate:?token:Token.t->user:string->repo:string->hook:Github_t.new_hook->unit->Github_t.hookResponse.tMonad.t(** [create ~user ~repo ~hook ()] is a newly created post-receive
hook for repo [user]/[repo] as described by [hook]. *)valupdate:?token:Token.t->user:string->repo:string->id:int64->hook:Github_t.update_hook->unit->Github_t.hookResponse.tMonad.t(** [update ~user ~repo ~id ~hook ()] is the updated hook [id] in
repo [user]/[repo] as described by [hook]. *)valdelete:?token:Token.t->user:string->repo:string->id:int64->unit->unitResponse.tMonad.t(** [delete ~user ~repo ~id ()] activates after hook [id] in repo
[user]/[repo] has been deleted. *)valtest:?token:Token.t->user:string->repo:string->id:int64->unit->unitResponse.tMonad.t(** [test ~user ~repo ~id ()] activates after a [push] event for
the lastest push to [user]/[repo] has been synthesized and
sent to hook [id]. *)valparse_event:constr:string->payload:string->unit->Github_t.event_hook_constr(** [parse_event ~constr ~payload ()] is the event with
constructor [constr] that is represented by [payload]. *)valparse_event_metadata:payload:string->unit->Github_t.event_hook_metadata(** [parse_event_metadata ~payload ()] is the event metadata for
the serialized event [payload]. *)endend(** The [Stats] module exposes the functionality of GitHub's
{{:https://developer.github.com/v3/repos/statistics/}repository
statistics API} which provides historical data regarding the
aggregate behavior of a repository. *)moduleStats:sigvalcontributors:?token:Token.t->user:string->repo:string->unit->Github_t.contributor_statsStream.t(** [contributors ~user ~repo ()] is a stream of all contributor
statistics for [user]/[repo]. The stream is empty if the
data are not cached yet *)end(** The [Status] module provides the functionality of GitHub's
{{:https://developer.github.com/v3/repos/statuses/}status API}. *)moduleStatus:sigvalfor_ref:?token:Token.t->user:string->repo:string->git_ref:string->unit->Github_t.statusStream.t(** [for_sha ~user ~repo ~git_ref ()] is a stream of statuses
attached to the SHA, branch name, or tag name [git_ref] in
repo [user]/[repo]. *)valcreate:?token:Token.t->user:string->repo:string->sha:string->status:Github_t.new_status->unit->Github_t.statusResponse.tMonad.t(** [create ~user ~repo ~sha ~status ()] is a newly created status
on SHA [sha] in repo [user]/[repo] as described by [status]. *)valget:?token:Token.t->user:string->repo:string->sha:string->unit->Github_t.combined_statusResponse.tMonad.t(** [get ~user ~repo ~sha ()] is the combined status of the ref
[sha] in the repo [user]/[repo]. *)end(** The [Pull] module contains functionality relating to GitHub's
{{:https://developer.github.com/v3/pulls/}pull request API}. *)modulePull:sigvalfor_repo:?token:Token.t->?state:Filter.state->user:string->repo:string->unit->Github_t.pullStream.t(** [for_repo ?state ~user ~repo ()] is a stream of pull requests
against repo [user]/[repo] which are currently in state
[?state] (default [`Open]). *)valget:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.pullResponse.tMonad.t(** [get ~user ~repo ~num ()] is the pull request [user]/[repo]#[num]. *)valcreate:?token:Token.t->user:string->repo:string->pull:Github_t.new_pull->unit->Github_t.pullResponse.tMonad.t(** [create ~user ~repo ~pull ()] is the newly created pull
request against repo [user]/[repo] as described by [pull]. *)valcreate_from_issue:?token:Token.t->user:string->repo:string->pull_issue:Github_t.new_pull_issue->unit->Github_t.pullResponse.tMonad.t(** [create_from_issue ~user ~repo ~pull_issue ()] is the newly
created pull request from an issue against repo [user]/[repo]
as described by [pull_issue]. *)valupdate:?token:Token.t->user:string->repo:string->update_pull:Github_t.update_pull->num:int->unit->Github_t.pullResponse.tMonad.t(** [update ~user ~repo ~update_pull ~num ()] is the updated pull
request [user]/[repo]#[num] as described by [update_pull]. *)valcommits:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.commitStream.t(** [commits ~user ~repo ~num ()] is the stream of commits
included in pull request [user]/[repo]#[num]. *)valfiles:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.fileStream.t(** [files ~user ~repo ~num ()] is the stream of files
included in pull request [user]/[repo]#[num]. *)valis_merged:?token:Token.t->user:string->repo:string->num:int->unit->boolResponse.tMonad.t(** [is_merged ~user ~repo ~num ()] is [true] if pull request
[user]/[repo]#[num] has been merged. *)valmerge:?token:Token.t->user:string->repo:string->num:int->?merge_commit_message:string->unit->Github_t.mergeResponse.tMonad.t(** [merge ~user ~repo ~num ?merge_commit_message ()] is the merge
of pull request [user]/[repo]#[num] with optional commit
message [?merge_commit_message]. *)end(** The [Issue] module gives users access to GitHub's
{{:https://developer.github.com/v3/issues/}issue API}. *)moduleIssue:sigvalfor_repo:?token:Token.t->?creator:string->?mentioned:string->?assignee:Filter.user->?labels:stringlist->?milestone:Filter.milestone->?state:Filter.state->?sort:Filter.issue_sort->?direction:Filter.direction->user:string->repo:string->unit->Github_t.issueStream.t(** [for_repo ?creator ?mentioned ?assignee ?labels ?milestone
?state ?sort ?direction ~user ~repo ()] is a stream of issues
in repo [user]/[repo] which were created by user [?creator],
mention user [?mentioned], are assigned to user [?assignee],
have labels [?labels], are included in milestone [?milestone],
and are in state [?state]. The stream is sorted by [?sort]
(default [`Created]) and ordered by [?direction] (default
[`Desc]). *)valget:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.issueResponse.tMonad.t(** [get ~user ~repo ~num ()] is the issue [user]/[repo]#[num]. *)valcreate:?token:Token.t->user:string->repo:string->issue:Github_t.new_issue->unit->Github_t.issueResponse.tMonad.t(** [create ~user ~repo ~issue ()] is a newly created issue
described by [issue] in repo [user]/[repo]. *)valupdate:?token:Token.t->user:string->repo:string->num:int->issue:Github_t.update_issue->unit->Github_t.issueResponse.tMonad.t(** [update ~user ~repo ~num ~issue ()] is the updated issue [num]
in [user]/[repo] as described by [issue]. *)valevents_for_repo:?token:Token.t->user:string->repo:string->unit->Github_t.repo_issues_eventStream.t(** [events_for_repo ~user ~repo ()] is a stream of all issue
events for [user]/[repo]. *)valevents:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.repo_issue_eventStream.t(** [events ~user ~repo ~num ()] is a stream of all issue events
for [user]/[repo]#[num]. *)valtimeline_events:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.timeline_eventStream.t(** [timeline_events ~user ~repo ~num ()] is a stream of all timeline
events for [user]/[repo]#[num]. *)valcomments:?token:Token.t->?since:string->user:string->repo:string->num:int->unit->Github_t.issue_commentStream.t(** [comments ?since ~user ~repo ~num ()] is a stream of issue
comments for [user]/[repo]#[num]. If [?since], an ISO 8601
format timestamp (YYYY-MM-DDTHH:MM:SSZ), is supplied, only
comments updated at or after this time are returned. *)valcomments_for_repo:?token:Token.t->?sort:Filter.issue_comment_sort->?direction:Filter.direction->?since:string->user:string->repo:string->unit->Github_t.issue_commentStream.t(** [comments_for_repo ~user ~repo ()] is a stream of issue
comments for repo [user]/[repo] sorted by [?sort] in
[?direction] order and having occurred since ISO 8601
timestamp (YYYY-MM-DDTHH:MM:SSZ) [?since]. *)valcreate_comment:?token:Token.t->user:string->repo:string->num:int->body:string->unit->Github_t.issue_commentResponse.tMonad.t(** [create_comment ~user ~repo ~num ~body ()] is a newly created
issue comment on [user]/[repo]#[num] with content [body]. *)valget_comment:?token:Token.t->user:string->repo:string->id:int64->unit->Github_t.issue_commentResponse.tMonad.t(** [get_comment ~user ~repo ~id ()] is issue comment [id] in repo
[user]/[repo]. *)valupdate_comment:?token:Token.t->user:string->repo:string->id:int64->body:string->unit->Github_t.issue_commentResponse.tMonad.t(** [update_comment ~user ~repo ~id ~body ()] is issue comment
[id] in repo [user]/[repo] updated with content [body]. *)valdelete_comment:?token:Token.t->user:string->repo:string->id:int64->unit->unitResponse.tMonad.t(** [delete_comment ~user ~repo ~id ()] activates after issue
comment [id] has been deleted from repo [user]/[repo]. *)vallabels:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.labelStream.t(** [labels ~user ~repo ~num ()] is a stream of all labels
applied to issue [num] in the repo [user]/[repo]. *)valadd_labels:?token:Token.t->user:string->repo:string->num:int->labels:stringlist->unit->Github_t.labellistResponse.tMonad.t(** [add_labels ~user ~repo ~num ~labels ()] is the list of labels
on issue [user]/[repo]#[num] with labels [labels] added. *)valremove_label:?token:Token.t->user:string->repo:string->num:int->name:string->unit->Github_t.labellistResponse.tMonad.t(** [remove_label ~user ~repo ~num ~name ()] is the list of labels
on issue [user]/[repo]#[num] after [name] has been removed. *)valreplace_labels:?token:Token.t->user:string->repo:string->num:int->labels:stringlist->unit->Github_t.labellistResponse.tMonad.t(** [replace_labels ~user ~repo ~num ~labels ()] is the list of
labels on issue [user]/[repo]#[num] as provided by
[labels]. *)valremove_labels:?token:Token.t->user:string->repo:string->num:int->unit->unitResponse.tMonad.t(** [remove_labels ~user ~repo ~num ()] activates after all labels
have been removed from issue [user]/[repo]#[num]. *)valis_issue:Github_t.issue->bool(** [is_issue issue] is true if [issue] is an actual issue and not
a pull request. *)valis_pull:Github_t.issue->bool(** [is_pull issue] is true if [issue] is a pull request. *)end(** The [Label] module exposes Github's
{{:https://developer.github.com/v3/issues/labels/}labels
API}. *)moduleLabel:sigvalfor_repo:?token:Token.t->user:string->repo:string->unit->Github_t.labelStream.t(** [for_repo ~user ~repo ()] is a stream of all labels in repo
[user]/[repo]. *)valget:?token:Token.t->user:string->repo:string->name:string->unit->Github_t.labelResponse.tMonad.t(** [get ~user ~repo ~name ()] is the label [name] in the repo
[user]/[repo]. *)valcreate:?token:Token.t->user:string->repo:string->label:Github_t.new_label->unit->Github_t.labelResponse.tMonad.t(** [create ~user ~repo ~label ()] is the newly created label
[label] in the repo [user]/[repo]. *)valupdate:?token:Token.t->user:string->repo:string->name:string->label:Github_t.new_label->unit->Github_t.labelResponse.tMonad.t(** [update ~user ~repo ~name ()] is the newly updated label
[name] with properties [label] in the repo [user]/[repo]. *)valdelete:?token:Token.t->user:string->repo:string->name:string->unit->unitResponse.tMonad.t(** [delete ~user ~repo ~name ()] activates after the label [name]
in the repo [user]/[repo] has been removed. *)end(** The [Collaborator] module exposes Github's
{{:https://developer.github.com/v3/repos/collaborators/}collaborators
API}. *)moduleCollaborator:sigvalfor_repo:?token:Token.t->user:string->repo:string->unit->Github_t.linked_userStream.t(** [for_repo ~user ~repo ()] is a stream of all collaborators in repo
[user]/[repo]. *)valexists:?token:Token.t->user:string->repo:string->name:string->unit->boolResponse.tMonad.t(** [exists ~user ~repo ~name ()] is true if [name] is a collaborator on
repo [user]/[repo]. *)valadd:?token:Token.t->user:string->repo:string->name:string->?permission:Github_t.team_permission->unit->unitResponse.tMonad.t(** [add ~user ~repo ~name ?permission ()] adds [name] as a collaborator on
repo [user]/[repo] with permission [permission] (default [`Push]). *)valremove:?token:Token.t->user:string->repo:string->name:string->unit->unitResponse.tMonad.t(** [remove ~user ~repo ~name ()] activates after [name] has been
removed from the collaborator set on the repo [user]/[repo]. *)end(** The [Milestone] module exposes GitHub's
{{:https://developer.github.com/v3/issues/milestones/}milestone
API}. *)moduleMilestone:sigvalfor_repo:?token:Token.t->?state:Filter.state->?sort:Filter.milestone_sort->?direction:Filter.direction->user:string->repo:string->unit->Github_t.milestoneStream.t(** [for_repo ?state ?sort ?direction ~user ~repo ()] is a stream
of all milestones in repo [user]/[repo] which match [?state]
(default [`Open]). The stream is sorted by [?sort] (default
[`Due_date]) and ordered by [?direction] (default [`Desc]). *)valget:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.milestoneResponse.tMonad.t(** [get ~user ~repo ~num ()] is milestone number [num] in repo
[user]/[repo]. *)valcreate:?token:Token.t->user:string->repo:string->milestone:Github_t.new_milestone->unit->Github_t.milestoneResponse.tMonad.t(** [create ~user ~repo ~milestone ()] is the newly created
milestone described by [milestone] in repo [user]/[repo]. *)valdelete:?token:Token.t->user:string->repo:string->num:int->unit->unitResponse.tMonad.t(** [delete ~user ~repo ~num ()] activates after milestone
[num] in repo [user]/[repo] has been deleted. *)valupdate:?token:Token.t->user:string->repo:string->milestone:Github_t.update_milestone->num:int->unit->Github_t.milestoneResponse.tMonad.t(** [update ~user ~repo ~milestone ~num ()] is the updated
milestone [num] in repo [user]/[repo] as described by
[milestone]. *)vallabels:?token:Token.t->user:string->repo:string->num:int->unit->Github_t.labelStream.t(** [labels ~user ~repo ~num ()] is a stream of all labels for
milestone [num] in repo [user]/[repo]. *)end(** The [Release] module provides access to GitHub's
{{:https://developer.github.com/v3/repos/releases/}release API}
features. *)moduleRelease:sigvalfor_repo:?token:Token.t->user:string->repo:string->unit->Github_t.releaseStream.t(** [for_repo ~user ~repo ()] is a stream of all releases in repo
[user]/[repo]. *)valget:?token:Token.t->user:string->repo:string->id:int64->unit->Github_t.releaseResponse.tMonad.t(** [get ~user ~repo ~id ()] is release number [id] in repo
[user]/[repo]. *)valget_by_tag_name:?token:Token.t->user:string->repo:string->tag:string->unit->Github_t.releaseMonad.t(** [get_by_tag_name ~user ~repo ~tag ()] is the release in repo
[user]/[repo] which is using git tag [tag]. *)valcreate:?token:Token.t->user:string->repo:string->release:Github_t.new_release->unit->Github_t.releaseResponse.tMonad.t(** [create ~user ~repo ~release ()] is the newly created release
described by [release] in repo [user]/[repo]. *)valdelete:?token:Token.t->user:string->repo:string->id:int64->unit->unitResponse.tMonad.t(** [delete ~user ~repo ~id ()] activates after release [id]
in repo [user]/[repo] has been deleted. *)valupdate:?token:Token.t->user:string->repo:string->release:Github_t.update_release->id:int64->unit->Github_t.releaseResponse.tMonad.t(** [update ~user ~repo ~release ~id ()] is the updated release
[id] in [user]/[repo] as described by [release]. *)valupload_asset:?token:Token.t->user:string->repo:string->id:int64->filename:string->content_type:string->body:string->unit->unitResponse.tMonad.t(** [upload_asset ~user ~repo ~id ~filename ~content_type ~body ()]
activates after [body] is uploaded to repo [user]/[repo] as
an asset for release [id] with file name [filename] and content
type [content_type]. *)end(** The [Deploy_key] module provides the means to manage
per-repository
{{:https://developer.github.com/guides/managing-deploy-keys/#deploy-keys}deploy
keys}.
@see <https://developer.github.com/v3/repos/keys/> deploy key API docs
*)moduleDeploy_key:sigvalfor_repo:?token:Token.t->user:string->repo:string->unit->Github_t.deploy_keyStream.t(** [for_repo ~user ~repo ()] is a stream of deploy keys
associated with repo [user]/[repo]. *)valget:?token:Token.t->user:string->repo:string->id:int64->unit->Github_t.deploy_keyResponse.tMonad.t(** [get ~user ~repo ~id ()] is deploy key [id] for repo [user]/[repo]. *)valcreate:?token:Token.t->user:string->repo:string->new_key:Github_t.new_deploy_key->unit->Github_t.deploy_keyResponse.tMonad.t(** [create ~user ~repo ~new_key ()] is the newly created deploy
key [new_key] for repo [user]/[repo]. *)valdelete:?token:Token.t->user:string->repo:string->id:int64->unit->unitResponse.tMonad.t(** [delete ~user ~repo ~id ()] activates after deploy key
[id] in repo [user]/[repo] has been deleted. *)end(** The [Gist] module provides access to the GitHub
{{:https://developer.github.com/v3/gists/}gist API}. *)moduleGist:sigvalfor_user:?token:Token.t->?since:string->user:string->unit->Github_t.gistStream.t(** [for_user ?since ~user ()] is a stream of gists that belong to
[user]. If [?since] is an ISO 8601 timestamp, only gists
updated since this time are returned. *)valall:?token:Token.t->?since:string->unit->Github_t.gistStream.t(** [all ?since ()] is a stream of all of the gists for the
current token's user or all public gists if invoked without a
current token. If [?since] is an ISO 8601 timestamp, only gists
updated since this time are returned. *)valall_public:?token:Token.t->?since:string->unit->Github_t.gistStream.t(** [all_public ?since ()] is a stream of all of the public gists
for the current token's user or all public gists if invoked
without a current token. If [?since] is an ISO 8601 timestamp, only gists
updated since this time are returned. *)valstarred:?token:Token.t->?since:string->unit->Github_t.gistStream.t(** [starred ?since ()] is a stream of all starred gists for the
current token's user. If [?since] is an ISO 8601 timestamp, only gists
updated since this time are returned. *)valget:?token:Token.t->id:string->unit->Github_t.gistResponse.tMonad.t(** [get ~id ()] is the gist [id]. *)valcreate:?token:Token.t->gist:Github_t.new_gist->unit->Github_t.gistResponse.tMonad.t(** [create ~gist ()] is a newly created gist described by [gist]. *)valupdate:?token:Token.t->id:string->gist:Github_t.update_gist->unit->Github_t.gistResponse.tMonad.t(** [update ~id ~gist ()] is the updated gist [id] as described
by [gist]. *)valcommits:?token:Token.t->id:string->unit->Github_t.gist_commitStream.t(** [commits ~id ()] is a stream of commits for gist [id]. *)valstar:?token:Token.t->id:string->unit->unitResponse.tMonad.t(** [star ~id ()] activates after gist [id] is marked as
starred by the current token's user. *)valunstar:?token:Token.t->id:string->unit->unitResponse.tMonad.t(** [unstar ~id ()] activates after gist [id] is marked as
not starred by the current token's user. *)(* is_starred *)valfork:?token:Token.t->id:string->unit->Github_t.gistResponse.tMonad.t(** [fork ~id ()] is a newly forked gist from gist [id]. *)valforks:?token:Token.t->id:string->unit->Github_t.gist_forkStream.t(** [forks ~id ()] is a stream of forks of gist [id]. *)valdelete:?token:Token.t->id:string->unit->unitResponse.tMonad.t(** [delete ~id ()] activates after gist [id] has been deleted. *)end(** The [Emoji] module exposes GitHub's
{{:https://developer.github.com/v3/emojis/}emoji API}. *)moduleEmoji:sigvallist:?token:Token.t->unit->Github_t.emojisResponse.tMonad.t(** [list ()] is the list of all available emojis for use on
GitHub in GitHub-flavored markdown. *)end(** The [Search] module exposes GitHub's
{{:https://developer.github.com/v3/search/}search interfaces}. *)moduleSearch:sigvalrepos:?token:Token.t->?sort:Filter.repo_sort->?direction:Filter.direction->qualifiers:Filter.qualifierlist->keywords:stringlist->unit->Github_t.repository_searchStream.t(** [repos ?sort ?direction ~qualifiers ~keywords ()] is a
stream of repository search results for [keywords] and
matching [qualifiers] predicates. Results are sorted by
[?sort] (default best match) and ordered by [?direction]
(default [`Desc]). *)valissues:?token:Token.t->?sort:Filter.repo_sort->?direction:Filter.direction->qualifiers:Filter.issue_qualifierlist->keywords:stringlist->unit->Github_t.repository_issue_searchStream.t(** [issues ?sort ?direction ~qualifiers ~keywords ()] is a
stream of issue search results for [keywords] and
matching [qualifiers] predicates. Results are sorted by
[?sort] (default best match) and ordered by [?direction]
(default [`Desc]). *)end(** {4 Utility Modules} *)(** The [Git_obj] module contains utility functions for working with
git concepts. *)moduleGit_obj:sigvaltype_to_string:Github_t.obj_type->string(** [type_to_string type] is the string name of object type [type]. *)valsplit_ref:string->string*string(** [split_ref ref] is the pair of ref directory and ref
name. E.g. if [ref] is "refs/tags/foo/bar" then [split_ref
ref] is ("tags","foo/bar"). *)endend(** A module of this type is required in order to construct a
{!Github} module using {!Github_core.Make}. *)moduletypeEnv=sigvaldebug:bool(** [debug] is the initial debugging flag value. *)end(** A module of this type is required in order to construct a
{!Github} module using {!Github_core.Make}. *)moduletypeTime=sigvalnow:unit->float(** [now ()] is the current UNIX epoch time in seconds. *)valsleep:float->unitLwt.t(** [sleep sec] activates after [sec] seconds have elapsed. *)end