Offers generic functions for interacting with BigML resources.
Offers generic functions for interacting with BigML resources.
Parameters used for authentication with the BigML API.
Parameters used for authentication with the BigML API.
Parameters used for connecting with the BigML API.
Parameters used for connecting with the BigML API.
(create resource-type dev-mode params)
Create a resource given a resouce-type, a boolean for development mode, and a map of parameters formatted for a clj-http POST. It's recommended to use the more friendly create functions in the source, dataset, model, evaluation, and prediction namespaces.
HTTP response information is attached as meta data. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
Create a resource given a resouce-type, a boolean for development mode, and a map of parameters formatted for a clj-http POST. It's recommended to use the more friendly create functions in the source, dataset, model, evaluation, and prediction namespaces. HTTP response information is attached as meta data. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
(delete resource & params)
Deletes the specified resource. The resource may be either a string
representing the resource id (model/123123
), or a map with either
the full resource (as returned with get
) or a partial
resource (as returned with list
). Returns true upon success.
Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
Deletes the specified resource. The resource may be either a string representing the resource id (`model/123123`), or a map with either the full resource (as returned with `get`) or a partial resource (as returned with `list`). Returns true upon success. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
(final? resource)
Returns true if the resource is final, meaning either finished or an error state (faulty, unknown, and runnable).
Returns true if the resource is final, meaning either finished or an error state (faulty, unknown, and runnable).
(finished? resource)
Returns true if the resource's status is finished.
Returns true if the resource's status is finished.
(get resource & params)
Retrieves the current resource. The resource may be either a string
representing the resource id (model/123123
), or a map with either
the full resource (as returned with get
) or a partial
resource (as returned with list
). The HTTP response information
is attached as meta data.
HTTP response information is attached as meta data. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
Retrieves the current resource. The resource may be either a string representing the resource id (`model/123123`), or a map with either the full resource (as returned with `get`) or a partial resource (as returned with `list`). The HTTP response information is attached as meta data. HTTP response information is attached as meta data. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
(get-final resource & {:keys [max-wait] :as params})
Retries GETs to the resource until it is finalized. Accepts :max-wait as an optional parameter. This limits the time (in milliseconds) that get-final will wait for a finalized resource. If a finalized resource hasn't occured by the limit, get-final will return nil.
Retries GETs to the resource until it is finalized. Accepts :max-wait as an optional parameter. This limits the time (in milliseconds) that get-final will wait for a finalized resource. If a finalized resource hasn't occured by the limit, get-final will return nil.
(list resource-type & params)
Retrieves a list of the desired resource type. The list will contain partial representations of the resource. Optional parameters can include pagination and filtering options as detailed here: Sources - https://bigml.com/developers/sources#s_list Datasets - https://bigml.com/developers/datasets#d_list Models - https://bigml.com/developers/models#m_list Predictions - https://bigml.com/developers/predictions#p_list Evaluations - https://bigml.com/developers/evaluations#e_list
Pagination details are returned as meta data attached to the list, along with the HTTP response information. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
Retrieves a list of the desired resource type. The list will contain partial representations of the resource. Optional parameters can include pagination and filtering options as detailed here: Sources - https://bigml.com/developers/sources#s_list Datasets - https://bigml.com/developers/datasets#d_list Models - https://bigml.com/developers/models#m_list Predictions - https://bigml.com/developers/predictions#p_list Evaluations - https://bigml.com/developers/evaluations#e_list Pagination details are returned as meta data attached to the list, along with the HTTP response information. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
(make-connection username api-key & [dev-mode])
Creates a connection intended for 'with-connection'. Requires a username and api-key and optionally accepts a boolean for development mode.
Creates a connection intended for 'with-connection'. Requires a username and api-key and optionally accepts a boolean for development mode.
(query-params & {:keys [username api_key dev_mode] :as params})
Transforms a list of parameters into a map of query parameters including the connection specific keys (:username, :api_key, and :dev_mode). Throws an exception when no authentication information is found.
Transforms a list of parameters into a map of query parameters including the connection specific keys (:username, :api_key, and :dev_mode). Throws an exception when no authentication information is found.
(resource-id resource)
Returns the resource id.
Returns the resource id.
(status-code resource)
Return the status code of the resource as a keyword. https://bigml.com/developers/status_codes
Return the status code of the resource as a keyword. https://bigml.com/developers/status_codes
(update resource updates & params)
Updates the specified resource given a map of attributes to be
updated. The resource may be either a string representing the
resource id (model/123123
), or a map with either the full
resource (as returned with get
) or a partial resource (as
returned with list
).
Returns the updated resource upon success. The valid attributes for updating are listed in the BigML API docs according to resource type: Sources - https://bigml.com/developers/sources#s_update Datasets - https://bigml.com/developers/datasets#d_update Models - https://bigml.com/developers/models#m_update Predictions - https://bigml.com/developers/predictions#p_update Evaluations - https://bigml.com/developers/evaluations#e_update
HTTP response information is attached as meta data. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
Updates the specified resource given a map of attributes to be updated. The resource may be either a string representing the resource id (`model/123123`), or a map with either the full resource (as returned with `get`) or a partial resource (as returned with `list`). Returns the updated resource upon success. The valid attributes for updating are listed in the BigML API docs according to resource type: Sources - https://bigml.com/developers/sources#s_update Datasets - https://bigml.com/developers/datasets#d_update Models - https://bigml.com/developers/models#m_update Predictions - https://bigml.com/developers/predictions#p_update Evaluations - https://bigml.com/developers/evaluations#e_update HTTP response information is attached as meta data. Exceptions are thrown on failure unless :throw-exceptions is set as false (default is true), in which case the HTTP response details are returned as a map on failure.
(with-connection connection & body)
Executes the body given the connection information.
Executes the body given the connection information.
(with-dev-mode dev & body)
Executes the body with development mode enabled or disabled according to the first argument, a boolean.
Executes the body with development mode enabled or disabled according to the first argument, a boolean.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close