MerakiAPIResource

Base class that all further endpoints inherits from. Each endpoint overrides it with its own custom endpoints, using the functions inherited from each class. Also, each child class must override the resource and parameters variable.

class meraki_api.MerakiAPIResource(key, prefix=None, resource_id=None)

Simplifies the creation of Meraki API resources.

call()

Calls the cached function.

check_for_resource_id()

Raises an exception if the resource_id is not defined.

create(data)

Create a new resource.

delete()

Deletes a resouce.

dynamic()

Makes the class dynamic (not lazy).

endpoint()

Builds the endpoint.

get(suffix=None)

Returns a class that can call a ger request to a built URL lazily.

get_url()

Gets the cached url.

index()

Get all the resources.

lazy()

Turns the class lazy.

post(suffix=None, data=None)

Returns a class that can call a post request to a built URL lazily.

put(suffix=None, data=None)

Returns a class that can call a put request to a built URL lazily.

request(method, suffix=None, data=None)

Dynamically create and call LazyRequest methods.

set_resource_id(resource_id)

Sets the resource_id value.

show()

Gets a resource.

update(data)

Updates a resource.

use(resource_id)

Alias to set_resource_id for better chaining. The only difference with this function is that the resource_id parameter is now required.