MPX v0.1.9 Mpx.Http
Provides the base http functionality for Ministry PLatform access including GET, POST, PUT and DELETE
Summary
Functions
Attempts to authenticate a client against MP
Attempts to get a token from MP based on the username/password/client_id/client_secret passed in
Wrapper for the Ministry Platform DELETE Api call
Wrapper for the Ministry Platform GET Api call
Makes calls the the ministryplatform/oauth
endpoint. This can be used for getting the current logged in user by passing me
and the current token
Wrapper for the Ministry Platform POST Api call
Wrapper for the Ministry Platform PUT Api call
Types
t :: {atom, map | list} | {atom, term}
Specifies what is returned from all of the HTTP calls
Functions
Attempts to authenticate a client against MP
Specs
authenticate_user(Mpx.Authentication.authentication_opts | []) :: {:ok | :error, String.t}
Attempts to get a token from MP based on the username/password/client_id/client_secret passed in
If an empty list is passed as the authentication options, attempts to use the configuration file
Specs
delete(binary, binary, Mpx.Tables.delete_options) :: t
Wrapper for the Ministry Platform DELETE Api call
Takes optional keyword list of options:
[ "$select": "The_columns_to_select",
"$filter": "The filter to apply",
etc...
]
see swagger for a complete list of parameters that the MP rest api takes
Returns an HTTPoison.Response
or HTTPoison.Error
Specs
get(binary, binary, keyword(binary)) :: t
Wrapper for the Ministry Platform GET Api call.
Takes optional keyword list of options:
[ "$select": "The_columns_to_select",
"$filter": "The filter to apply",
etc...
]
See swagger for a complete list of parameters that the MP rest api takes.
Returns an HTTPoison.Response
or HTTPoison.Error
Specs
oauth_get(binary, binary) :: t
Makes calls the the ministryplatform/oauth
endpoint. This can be used for getting the current logged in user by passing me
and the current token.
Specs
post(binary, binary, map | list, keyword(binary)) :: t
Wrapper for the Ministry Platform POST Api call
Takes optional keyword list of options:
[ "$select": "The_columns_to_select",
"$filter": "The filter to apply",
etc...
]
see swagger for a complete list of parameters that the MP rest api takes.
Returns an HTTPoison.Response
or HTTPoison.Error
Specs
put(binary, binary, map | list, keyword(binary)) :: t
Wrapper for the Ministry Platform PUT Api call
Takes optional keyword list of options:
[ "$select": "The_columns_to_select",
"$filter": "The filter to apply",
etc...
]
see the swagger documentation for a
complete list of parameters that the MP rest api takes.
Returns an HTTPoison.Response
or HTTPoison.Error