Contests

In order to get a Contest object, use mooshak2api.contests.get

mooshak2api.contests.get(connection: mooshak2api.client.Client, contest_id: str) → mooshak2api.contests.Contest[source]

Gets a single Contest :param connection: Client to connect to :param contest_id: the ID of the contest. e.g. ToPAS14 :return: returns a Contest

Or, if you want all Contests, you can use mooshak2api.contests.get_all

mooshak2api.contests.get_all(connection: mooshak2api.client.Client) → Iterable[mooshak2api.contests.Contest][source]

You will be returned an array of Contests

Contest Objects are the python interpretation of mooshak2 Contests. The properties of it depend on what is returned, but should contain at least an ID.

class mooshak2api.contests.Contest[source]

A Mooshak2 Contest. The only required property that is required is an ID

You can also create a new Contest in mooshak2, by creating a new Contest Object, and then calling .create

mooshak2api.contests.Contest.create(self, connection)

Creates a Contest

You should ensure that the contest has ID set, and that any properties that you want to add are in self.property_names :param connection: the Client to connect with :return: returns a request - with status 201 if successful

You can also update and delete contests!

mooshak2api.contests.Contest.update(self, connection)

Updates a Contest :param connection: the Client to connect with :return: returns a request - with status 201 if successful

mooshak2api.contests.Contest.delete(self, connection)

Deletes a Contest :param connection: the Client to connect with :return: returns a request - with status 201 if successful