Patchwork

class patchwork.Patchwork.Patchwork

This is the main class to access the Patchwork API.

Parameters:

base_url (string) – Base url of the Patchwork site

get_user(id)

Show a user

Calls:

GET /api/users/{id}/

Parameters:

id (integer) – A unique integer value identifying this user

Return type:

patchwork.User.User

get_all_users()

List Users

Calls:

GET /api/users/

Return type:

patchwork.Pagination.Pagination of patchwork.User.User

get_project(id)

Show a project

Calls:

GET /api/projects/{id}

Parameters:

id (integer) – A unique integer value identifying this project

Return type:

patchwork.Project.Project

get_all_projects()

List projects

Calls:

GET /api/projects/

Return type:

patchwork.Pagination.Pagination of patchwork.Project.Project

get_people(id)

Show a people

Calls:

GET /api/people/{id}

Parameters:

id (integer) – A unique integer value identifying this person

Return type:

patchwork.People.People

get_all_people()

List People

Calls:

GET /api/people/

Return type:

patchwork.Pagination.Pagination of patchwork.People.People

get_series(id)

Show a series

Calls:

GET /api/series/{id}

Parameters:

id (integer) – A unique integer value identifying this series

Return type:

patchwork.Series.Series

get_all_series()

List series

Calls:

GET /api/series/

Return type:

patchwork.Pagination.Pagination of patchwork.Series.Series

get_cover_letter(id)

Show a cover letter

Calls:

GET /api/covers/{id}

Parameters:

id (integer) – A unique integer value identifying this cover letter

Return type:

patchwork.Cover.Cover

get_all_cover_letters()

List Cover letters

Calls:

GET /api/covers/

Return type:

patchwork.Pagination.Pagination of patchwork.Cover.Cover

get_patch(id)

Show a patch

Calls:

GET /api/patches/{id}

Parameters:

id (integer) – A unique integer value identifying this patch

Return type:

patchwork.Patch.Patch

search_patches(project=None, series=None, submitter=None, delegate=None, state=None, archived=None, hash=None, msgid=None)

List patches

Calls:

GET /api/patches/

Parameters:
  • project (string) – An ID or linkname of a project to filter patches by

  • series (integer) – An ID of a series to filter patches by

  • submitter (string) – An ID or email address of a person to filter patches by.

  • delegate (string) – An ID or username of a user to filter patches by

  • state (string) – A slug representation of a state to filter patches by

  • archived (bool) – Show only archived(True) or non-archived(False) patches

  • hash (string) – The patch hash as a case-insensitive hexadecial string to filter by

  • msgid (string) – The patch message-id as a case-sensitive string, without leading or trailing angle brackets, to filter by

Return type:

patchwork.Pagination.Pagination of patchwork.Patch.Patch

get_all_patches()

List Patches

Calls:

GET /api/patches/

Return type:

patchwork.Pagination.Pagination of patchwork.Patch.Patch

get_bundle(id)

Show a bundle

Calls:

GET /api/bundles/{id}

Parameters:

id (integer) – A unique integer value identifying this bundle

Return type:

patchwork.Bundle.Bundle

get_all_bundles()

List Bundles

Calls:

GET /api/bundles

Return type:

patchwork.Pagination.Pagination of patchwork.Bundle.Bundle