-
Notifications
You must be signed in to change notification settings - Fork 0
Package API Reference
A contact is a person who is affiliated with an initiative.
The access log is a record of when access was granted or revoked
An export code is a code that can be used to export data
Returns the choices for the access log
Returns:
- a tuple of choices
This function is for OtF style presses using the access log It's not a functional requirement of OBC so has been postponed for v2
List all contacts for initiatives owned by the logged-in user.
Parameters:
-
request: the request object
Returns:
- rendered response
Create or edit a contact.
Parameters:
-
request: the request object -
contact_id: the contact ID (optional, for editing)
Returns:
- rendered response
Delete a contact.
Parameters:
-
request: the request object -
contact_id: the contact ID
Returns:
- redirect response
User profile extending Django's User model with additional fields.
Get the full name of the user.
Returns:
- the full name as a string
Get all active baskets for this user.
Returns:
- queryset of active baskets
Stores banding choices made by a user account.
Generate upload path for profile images.
Parameters:
-
instance: unused (required by Django) -
filename: the original filename
Returns:
- the upload path for the profile image
This checks whether or not this banding is currently set for the user
Parameters:
-
request: the request object
Returns:
- true or false
Process permission changes from a request.
Parameters:
-
request: the request object containing permission changes
Returns:
- None
Redirects to the two_factor login page.
Parameters:
-
request: HttpRequest
Returns:
- HttpRedirect
Allows a user to edit their profile.
Parameters:
-
request: HttpRequest
Returns:
- HttpResponse
Allows a user to edit their profile.
Parameters:
-
request: HttpRequest
Returns:
- HttpResponse
Allows a user to edit their profile.
Parameters:
-
request: HttpRequest
Returns:
- HttpResponse
Allows a user to manage accounts on the platform.
Parameters:
-
request: HttpRequest
Returns:
- HttpResponse
The root API view for OBC.
API endpoint that allows packages to be viewed.
API endpoint that allows initiatives to be viewed.
API endpoint that allows standards to be viewed.
API endpoint that allows standards to be viewed.
API endpoint that allows countries and currencies to be viewed.
API endpoint that allows banding types to be viewed.
API endpoint that allows banding vocabularies to be viewed.
API endpoint that allows bandings to be viewed.
API endpoint that allows prices to be viewed.
Installs cron tasks.
Pushes the backup to S3
Parameters:
-
args: None -
options: None
Returns:
- None
Installs cron tasks.
Pushes the backup to S3
Parameters:
-
args: None -
options: None
Returns:
- None
Installs cron tasks.
Pushes the backup to S3
Parameters:
-
args: None -
options: None
Returns:
- None
Admin for the Page model.
Admin for the Version model.
Admin for the SiteText model.
Form for creating and updating PageUpdate objects.
Resize the thumbnail image to the correct dimensions.
Returns:
- The resized image.
Resize the mid-page image to the correct dimensions.
Returns:
- The resized image.
Save the PageUpdate object.
Parameters:
-
commit: Whether to commit the object to the database.
Returns:
- The saved PageUpdate object.
Form for creating and updating Version objects.
Form for creating and updating WhoWeAreProfileItem objects.
Resize the user's profile image to the correct dimensions. The name of this function is a joke,
Returns:
- The resized image.
Save the WhoWeAreProfileItem object.
Parameters:
-
commit: Whether to commit the object to the database.
Returns:
- The saved WhoWeAreProfileItem object.
Form for creating and updating PrimaryInitiative objects.
Form for creating and updating HomePageQuote objects.
Resize the organization logo to the correct dimensions.
Returns:
- The resized image.
Form for editing the site text.
A version of a page or news update. A page or news update can have
A page or news update. A page or news update can have multiple versions.
Returns the first character of the first paragraph of the current object
Returns:
- str
Returns the first paragraph of the current object minus the first character
Returns:
- str
Returns the url for editing this page
Returns the url for viewing this page
Returns:
- an url string
Configures items visible on the Who We Are page
Configures items visible on the site-wide news feed
Configures the primary initiative for the site
Configures quotes visible on the home page
Configures items visible on the home page
A site text object
Display the text, with an edit link if the user is staff
Parameters:
-
context: the request context
Returns:
- the text, with an edit link if the user is staff
Get the site text for the given key and render it with the given context.
Parameters:
-
context: The context to render the site text with. -
site_text_key: The key of the site text to render. -
cms_prefetched: A dictionary of prefetched site text objects.
Returns:
- The rendered site text.
Get the site text for the given key and render it with the given context without the edit text.
Parameters:
-
context: The context to render the site text with. -
site_text_key: The key of the site text to render. -
cms_prefetched: A dictionary of prefetched site text objects.
Returns:
- The rendered site text.
Resize an image to the specified width and height
Parameters:
-
width: the width to resize to -
height: the height to resize to -
image_upload: the image to resize
Returns:
- the resized image
Send a notification to the platform manager that a page has been updated
Parameters:
-
request: the request object -
initiative: the initiative that the page belongs to -
page_or_update: either "page" or "update" -
page: the page that was updated
Returns:
- None
Send a notification to the target institution that a page has been updated
Parameters:
-
request: the request object -
page: the page that was updated
Returns:
- None
View for managing featured books
Parameters:
-
request: the request object -
initiative: the initiative object
Returns:
- HttpResponse object
View for managing pages
Parameters:
-
request: the request object -
initiative: the initiative object -
page_or_update: either "page" or "update"
Returns:
- HttpResponse object
Reorders the Form Elements list, posted via AJAX.
Parameters:
-
request: HttpRequest object -
initiative_id: the initiative ID
Returns:
- HttpResponse object
View for managing pages
Parameters:
-
request: the request object -
initiative: the initiative object -
page_or_update: either "page" or "update" -
page_id: the page ID
Returns:
- HttpResponse object
View for creating a featured book
Parameters:
-
request: the request object -
initiative: the initiative object
Returns:
- HttpResponse object
View for editing or creating a page
Parameters:
-
request: the request object -
initiative: the initiative object -
page_or_update: either "page" or "update" -
page_id: the page ID
Returns:
- HttpResponse object
Delete a featured book
Parameters:
-
request: the request object -
initiative: the initiative object -
fb_id: the featured book ID
Returns:
- HttpResponse object
Delete a page
Parameters:
-
request: the request object -
initiative: the initiative object -
page_or_update: the page or update -
page_id: the page ID
Returns:
- HttpResponse object
View a version of a page or update
Parameters:
-
request: the request object -
initiative: the initiative object -
page_or_update: the page or update -
page_id: the page ID -
version_id: the version ID
Returns:
- HttpResponse object
View the current version of a page or update
Parameters:
-
request: the request object -
initiative: the initiative object -
page_or_update: the page or update -
page_id: the page ID
Returns:
- HttpResponse object
View the diff between two versions of a page or update
Parameters:
-
request: the request object -
initiative: the initiative object -
page_or_update: the page or update -
page_id: the page ID -
version_one_id: the first version ID -
version_two_id: the second version ID
Returns:
- HttpResponse object
View the page update feed]
Parameters:
-
request: the request object
Returns:
- HttpResponse object
Configure the sitewide news
Parameters:
-
request: the request object
Returns:
- HttpResponse object
View the sitewide news
Parameters:
-
request: the request object
Returns:
- HttpResponse object
View a news item
Parameters:
-
request: the request object -
update_id: the update ID
Returns:
- HttpResponse object
Extracts the IDs from a list of strings
Parameters:
-
input_list: the list of strings
Returns:
- list of IDs
Reorders the Form Elements list, posted via AJAX.
Parameters:
-
request: HttpRequest object
Returns:
- HttpResponse object
Configure the who we are section
Parameters:
-
request: the request object
Returns:
- HttpResponse object
Add or edit a who we are entry
Parameters:
-
request: the request object -
section: the section -
entry_id: the entry ID
Returns:
- HttpResponse object
Delete a sitewide news item
Parameters:
-
request: the request object -
news_id: the news item ID
Returns:
- HttpResponse object
Delete a who we are entry
Parameters:
-
request: the request object -
entry_id: the entry ID
Returns:
- HttpResponse object
Reorders the Form Elements list, posted via AJAX.
Parameters:
-
request: HttpRequest object
Returns:
- HttpResponse object
Configure the fixed pages
Parameters:
-
request: the request object
Returns:
- HttpResponse object
Renders a fixed page
Parameters:
-
request: the request object -
page_string: the page string
Returns:
- HttpResponse object
View all pages
Parameters:
-
request: the request object
Returns:
- HttpResponse object
Render a page.
Parameters:
-
request: the request object -
page_id: the page ID
Returns:
- HttpResponse object
Configure the homepage quotes
Parameters:
-
request: the request object
Returns:
- HttpResponse object
Create or edit a homepage quote
Parameters:
-
request: the request object -
quote_id: the quote ID
Returns:
- HttpResponse object
Delete a homepage quote
Parameters:
-
request: the request object -
quote_id: the quote ID
Returns:
- HttpResponse object
Reorders the Homepage Quotes list, posted via AJAX.
Parameters:
-
request: HttpRequest object
Returns:
- HttpResponse object
Reorders the featured books
Parameters:
-
request: HttpRequest object -
initiative_id: the initiative ID
Returns:
- HttpResponse object
View to handle both displaying the modal for editing site text and saving the updated text in the selected language.
Parameters:
-
request: the request object -
key: the site text key -
lang_code: the language code
Returns:
- rendered response or success message
View to list all site texts with a language selection dropdown.
Parameters:
-
request: the request object
Returns:
- rendered response
View to download a CSV of all site texts.
Parameters:
-
request: the request object
Returns:
- CSV download response
Convert the visitor stats to a dictionary
Parameters:
-
stats: the stats
Returns:
- a dictionary of stats
The dashboard index
Parameters:
-
request: the request object
Returns:
- an HTTP response
The document centre dashboard
Parameters:
-
request: the request object
Returns:
- a rendered response
View a frozen document, piping it through Django in 8KB chunks to avoid memory issues.
Parameters:
-
request: the request object -
document_id: the document ID
Returns:
- A FileResponse
The site setup page
Parameters:
-
request: the request object
Returns:
- an HTTP response
Generate the graph of books published on the homepage
Parameters:
-
books: the book objects
Returns:
- Labels, publisher counts, and template lists
Produces a custom JS template for the graphing system in the dashboard
Parameters:
-
color: the color to use (a string of type 'rgba(210, 0, 0, 1)') -
publisher_name: the name of the publisher -
publisher_data: the data list to use
Returns:
- a dictionary of values for json_script
A form that represents an initiative
Resize the image to 335x100
Returns:
- a resized image
An initiative is an organisation working in the OA books space, i.e. a publisher or infrastructure provider
Return the primary key as a string.
Returns:
- string of primary key
Return a string representation of the active field.
Returns:
- "Yes" or "No"
Return the highlights for this initiative.
Returns:
- a queryset of highlights
Highlights for an initiative.
Upload path for initiative profile images.
Parameters:
-
instance: unused -
filename: the filename of the uploaded file
Returns:
- a new filename
Upload path for initiative highlights images.
Parameters:
-
instance: unused -
filename: the filename of the uploaded file
Returns:
- a new filename
List all initiatives
Parameters:
-
request: the request
Returns:
- an HTTP response
List all active public initiatives
Parameters:
-
request: the request
Returns:
- an HTTP response
Show a public initiative
Parameters:
-
request: the request -
initiative_id: the initiative id -
page_id: the page id
Returns:
- an HTTP response
Show initiative details
Parameters:
-
request: the request -
initiative_id: the initiative id
Returns:
- an HTTP response
Edit or create an initiative
Parameters:
-
request: the request -
initiative_id: the initiative id
Returns:
- an HTTP response
Delete an initiative: this function is not used as it is DANGEROUS
Parameters:
-
request: the request. Unused. -
initiative_id: the initiative id. Unused.
Returns:
- None
List all initiatives for the current user
Parameters:
-
request: the request
Returns:
- an HTTP response
List all packages for an initiative
Parameters:
-
request: the request -
initiative: the initiative
Returns:
- an HTTP response
Installs cron tasks.
Installs Cron
Parameters:
-
args: None -
options: None
Returns:
- None
Find job in cron tab
Parameters:
-
tab: the cron tab -
comment: the comment
Returns:
- the job or None
Diff Match and Patch Copyright 2018 The diff-match-patch Authors. https://github.com/google/diff-match-patch
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Class containing the diff, match and patch methods. Also contains the behaviour settings.
Find the differences between two texts. Simplifies the problem by stripping any common prefix or suffix off the texts before diffing. Args: text1: Old string to be diffed. text2: New string to be diffed. checklines: Optional speedup flag. If present and false, then don't run a line-level diff first to identify the changed areas. Defaults to true, which does a faster, slightly less optimal diff. deadline: Optional time when the diff should be complete by. Used internally for recursive calls. Users should set DiffTimeout instead. Returns: Array of changes.
Find the differences between two texts. Assumes that the texts do not have any common prefix or suffix. Args: text1: Old string to be diffed. text2: New string to be diffed. checklines: Speedup flag. If false, then don't run a line-level diff first to identify the changed areas. If true, then run a faster, slightly less optimal diff. deadline: Time when the diff should be complete by. Returns: Array of changes.
Do a quick line-level diff on both strings, then rediff the parts for greater accuracy. This speedup can produce non-minimal diffs. Args: text1: Old string to be diffed. text2: New string to be diffed. deadline: Time when the diff should be complete by. Returns: Array of changes.
Find the 'middle snake' of a diff, split the problem in two and return the recursively constructed diff. See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations. Args: text1: Old string to be diffed. text2: New string to be diffed. deadline: Time at which to bail if not yet complete. Returns: Array of diff tuples.
Given the location of the 'middle snake', split the diff in two parts and recurse. Args: text1: Old string to be diffed. text2: New string to be diffed. x: Index of split point in text1. y: Index of split point in text2. deadline: Time at which to bail if not yet complete. Returns: Array of diff tuples.
Split two texts into an array of strings. Reduce the texts to a string of hashes where each Unicode character represents one line. Args: text1: First string. text2: Second string. Returns: Three element tuple, containing the encoded text1, the encoded text2 and the array of unique strings. The zeroth element of the array of unique strings is intentionally blank.
Rehydrate the text in a diff from a string of line hashes to real lines of text. Args: diffs: Array of diff tuples. lineArray: Array of unique strings.
Determine the common prefix of two strings. Args: text1: First string. text2: Second string. Returns: The number of characters common to the start of each string.
Determine the common suffix of two strings. Args: text1: First string. text2: Second string. Returns: The number of characters common to the end of each string.
Determine if the suffix of one string is the prefix of another. Args: text1 First string. text2 Second string. Returns: The number of characters common to the end of the first string and the start of the second string.
Do the two texts share a substring which is at least half the length of the longer text? This speedup can produce non-minimal diffs. Args: text1: First string. text2: Second string. Returns: Five element Array, containing the prefix of text1, the suffix of text1, the prefix of text2, the suffix of text2 and the common middle. Or None if there was no match.
Reduce the number of edits by eliminating semantically trivial equalities. Args: diffs: Array of diff tuples.
Look for single edits surrounded on both sides by equalities which can be shifted sideways to align the edit to a word boundary. e.g: The cat came. -> The cat came. Args: diffs: Array of diff tuples.
Reduce the number of edits by eliminating operationally trivial equalities. Args: diffs: Array of diff tuples.
Reorder and merge like edit sections. Merge equalities. Any edit section can move as long as it doesn't cross an equality. Args: diffs: Array of diff tuples.
loc is a location in text1, compute and return the equivalent location in text2. e.g. "The cat" vs "The big cat", 1->1, 5->8 Args: diffs: Array of diff tuples. loc: Location within text1. Returns: Location within text2.
Convert a diff array into a pretty HTML report. Args: diffs: Array of diff tuples. Returns: HTML representation.
Compute and return the source text (all equalities and deletions). Args: diffs: Array of diff tuples. Returns: Source text.
Compute and return the destination text (all equalities and insertions). Args: diffs: Array of diff tuples. Returns: Destination text.
Compute the Levenshtein distance; the number of inserted, deleted or substituted characters. Args: diffs: Array of diff tuples. Returns: Number of changes.
Crush the diff into an encoded string which describes the operations required to transform text1 into text2. E.g. =3 -2 +ing -> Keep 3 chars, delete 2 chars, insert 'ing'. Operations are tab-separated. Inserted text is escaped using %xx notation. Args: diffs: Array of diff tuples. Returns: Delta text.
Given the original text1, and an encoded string which describes the operations required to transform text1 into text2, compute the full diff. Args: text1: Source string for the diff. delta: Delta text. Returns: Array of diff tuples. Raises: ValueError: If invalid input.
Locate the best instance of 'pattern' in 'text' near 'loc'. Args: text: The text to search. pattern: The pattern to search for. loc: The location to search around. Returns: Best match index or -1.
Locate the best instance of 'pattern' in 'text' near 'loc' using the Bitap algorithm. Args: text: The text to search. pattern: The pattern to search for. loc: The location to search around. Returns: Best match index or -1.
Initialise the alphabet for the Bitap algorithm. Args: pattern: The text to encode. Returns: Hash of character locations.
Increase the context until it is unique, but don't let the pattern expand beyond Match_MaxBits. Args: patch: The patch to grow. text: Source text.
Compute a list of patches to turn text1 into text2. Use diffs if provided, otherwise compute it ourselves. There are four ways to call this function, depending on what data is available to the caller: Method 1: a = text1, b = text2 Method 2: a = diffs Method 3 (optimal): a = text1, b = diffs Method 4 (deprecated, use method 3): a = text1, b = text2, c = diffs Args: a: text1 (methods 1,3,4) or Array of diff tuples for text1 to text2 (method 2). b: text2 (methods 1,4) or Array of diff tuples for text1 to text2 (method 3) or undefined (method 2). c: Array of diff tuples for text1 to text2 (method 4) or undefined (methods 1,2,3). Returns: Array of Patch objects.
Given an array of patches, return another array that is identical. Args: patches: Array of Patch objects. Returns: Array of Patch objects.
Merge a set of patches onto the text. Return a patched text, as well as a list of true/false values indicating which patches were applied. Args: patches: Array of Patch objects. text: Old text. Returns: Two element Array, containing the new text and an array of boolean values.
Add some padding on text start and end so that edges can match something. Intended to be called only from within patch_apply. Args: patches: Array of Patch objects. Returns: The padding string added to each side.
Look through the patches and break up any which are longer than the maximum limit of the match algorithm. Intended to be called only from within patch_apply. Args: patches: Array of Patch objects.
Take a list of patches and return a textual representation. Args: patches: Array of Patch objects. Returns: Text representation of patches.
Parse a textual representation of patches and return a list of patch objects. Args: textline: Text representation of patches. Returns: Array of Patch objects. Raises: ValueError: If invalid input.
Class representing one patch operation.
Form for editing the site setup.
Middleware that prints the IP address of the request to the console
Parameters:
-
get_response: a callable that takes a request and returns a response
Returns:
- a request object
Middleware that ensures that a session key is always present
Parameters:
-
get_response: a callable
Returns:
- a request object
Middleware that ensures that a session key is always present
Parameters:
-
get_response: a callable
Returns:
- a request object
Middleware that injects commonly used variables into the request
Parameters:
-
get_response: a callable
Returns:
- a new request object
Populate the sites model
This is a singleton class to store site variables. There should only ever be one object in here
A private image is an image that is not publicly accessible
Get the mime type of the image
Serve the image file
Returns:
- an HttpResponse
When a user logs in, copy all their session baskets to their user account
Parameters:
-
sender: the dispatcher -
user: the user who just logged in -
request: the request object -
kwargs: other arguments (unused)
Returns:
- None
Generate a unique filename for a private image
Parameters:
-
instance: unused (required by Django) -
filename: the original filename
Returns:
- a new path
Checks that the current user is an initiative manager
Parameters:
-
func: the function to wrap
Returns:
- the result of the underlying function
Extends the default session store to update the session ID for when a user logs in, to preserver their basket.
Cycles a key in the session store when the user logs in.
Returns:
- None
Django settings for intrepid project.
Generated by 'django-admin startproject' using Django 2.2.24.
For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/
Returns a font awesome icon for a boolean value.
Parameters:
-
boolean: a boolean value
Returns:
- HTML code for a font awesome icon
Get the banding for a package.
Parameters:
-
costs: the costs -
package: the package to get the banding for
Returns:
- a string with the banding
Get the total cost for a meta package.
Parameters:
-
costs: the costs for the meta package -
meta_package: the meta package -
converted_currency: the currency to convert to
Returns:
- the currency totals
Get the cost for a package.
Parameters:
-
costs: the costs -
package: the package to get the cost for -
converted_currency: the currency to convert to
Returns:
- the cost
Get the cost for a package.
Parameters:
-
costs: the costs -
package: the package to get the cost for -
converted_currency: the currency to convert to
Returns:
- the cost
Format a price.
Parameters:
-
cost: the cost -
currency: the currency
Returns:
- a formatted currency string
Format a price.
Add the total and site fee together.
Parameters:
-
currency_total: the currency total -
site_percentage: the site percentage
Returns:
- the final cost
Check if the user is a manager of an initiative
Parameters:
-
request: a request object -
role: a role object
Returns:
- true if the user is a manager of an initiative otherwise false
Check if the user has a permission to a view.
Parameters:
-
context: the request context -
view_name: the view name
Returns:
- true if allowed to view, otherwise false
Determine whether to return to a page or go to a default page.
Parameters:
-
request: a request object -
return_page: the default page to return to
Returns:
- an HttpResponseRedirect object
Serve a file
Parameters:
-
path: the path -
filename: the filename -
mime: the mime type
Returns:
- HttpResponse
Site index for intrepid.
Parameters:
-
request: a request
Returns:
- a response
An early and now unused test index loader
Parameters:
-
request: a request
Returns:
- a response
Render the "who we are" page
Parameters:
-
request: the request object
Returns:
- a response
Create a CSV output
Parameters:
-
field_list_method: a method that lists the fields to evaluate -
request: request object -
queryset: the queryset -
field_method: a method that builds a field list
Returns:
- a response object
Export a CSV of signups
Parameters:
-
request: a request -
target: the object type to export
Returns:
- a response
Render a site page.
Parameters:
-
request: the request object -
page_name: the URL expression for the page
Returns:
- a rendered response
WSGI config for intrepid project.
It exposes the WSGI callable as a module-level variable named application.
For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
Form for changing the status of an invoice.
Form for creating a new payment processor.
A payment processor is a company that handles payments for us.
Check if a user is a manager of this payment processor.
Parameters:
-
user: the user to check
Returns:
- True if user is a manager, False otherwise
An invoice for a signup.
Get the last status update for this invoice.
Returns:
- an InvoiceLog object
A log of status changes for an invoice.
Choices for the status field of invoices.
Returns:
- a tuple of tuples
When the status of an Invoice changes the log should add an entry.
Parameters:
-
sender: unused -
instance: the invoice instance -
created: unused -
kwargs: unused
Returns a queryset of invoices for the given order, filtered by the request user's payment processors.
Parameters:
-
context: the request context -
order: the order to filter invoices for
Returns:
- a queryset of invoices
Displays a list of an order's invoices.
Parameters:
-
request: the request -
payment_processor_id: the payment processor ID
Returns:
- an HttpResponse
Shows details of an invoice.
Parameters:
-
request: the request -
payment_processor_id: the payment processor ID -
order_id: the order ID
Returns:
- an HttpResponse
Displays a list of an order's invoices.
Parameters:
-
request: the request -
initiative_id: the initiative ID
Returns:
- an HttpResponse
Invoice detailing for an initiative.
Parameters:
-
request: a request object -
initiative_id: an initiative ID -
order_id: an order ID
Returns:
- an HttpResponse
Create a list of payment processors
Parameters:
-
request: a request object
Returns:
- an HttpResponse
Edit a payment processor
Parameters:
-
request: a request object -
processor_id: a payment processor ID
Returns:
- an HttpResponse
A management command that sends a test email
A management command that syncs Mailgun statuses to the database
Update the statuses of all logs
Returns:
- None
A log of all emails sent through the system.
A template for an email.
Render the email template with the given context.
Parameters:
-
context: the context with which to render the template
Returns:
- the rendered email template
Send an email.
Parameters:
-
to: the email recipient -
context: the context with which to render the template -
subject: the email subject -
from_email: the email sender -
bcc: the email bcc -
attachments: the email attachments
Returns:
- the email response
List all email logs
Parameters:
-
request: the request
Returns:
- the response
Update the email statuses
Parameters:
-
request: the request
Returns:
- the response
Django's command-line utility for administrative tasks.
Admin for Country model
Admin for Banding model
Admin for Price model
Admin for Package model
Inline for MetaPackageLink model
Admin for MetaPackage model
Admin for Basket model
Admin for AggregateFormElement model
Admin for PackageDocument model
Admin for BandingType model
Admin for BandingTypeEntry model
Admin for BandingTypeCurrencyEntry model
Admin for Order model
Admin for PackageDocumentHistorical model
Inline for SignupInvoice model
Admin for PackageSignup model
Allows a staff member to view a list of banding types.
Parameters:
-
request: the request object
Returns:
- the response object
Allows a staff member to create a new banding type.
Parameters:
-
request: the request object
Returns:
- the response object
Allows a staff member to manage the vocabs for a banding type.
Parameters:
-
request: the request object -
banding_type_id: the banding type id
Returns:
- the response object
Allows a staff member to edit an existing banding type. NOTE: Unimplemented.
Parameters:
-
request: the request object -
banding_type_id: the banding type id
Returns:
- the response object
Allows a staff member to delete a banding type. NOTE: Unimplemented.
Parameters:
-
request: the request object -
banding_type_id: the banding type id
Returns:
- the response object
Allows a staff member to order banding types. NOTE: Unimplemented.
Parameters:
-
request: the request object
Returns:
- the response object
Returns a dictionary of packages awaiting approval
Parameters:
-
request: the request object (unused)
Returns:
- a dictionary of packages awaiting approval
Convert a value from a currency to another
Parameters:
-
currency_from: the currency to convert from -
currency_to: the currency to convert to -
value: the value to convert
Returns:
- the converted value
Form for creating a new basket
Save the form
Parameters:
-
commit: whether to commit or not
Form for entering FTE and currency
Save the form
Form for managing packages
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- tuple
Form for managing meta packages
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- the meta package
Form for managing form elements
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- the form element
Custom M2M field for vocabularies
Display the label for a vocabulary
Parameters:
-
vocab: the vocabulary
Returns:
- the label
Form for managing banding types
Form for managing banding type entries
Form for uploading documents
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- the document
Form for selecting banding types
Form for selecting standards
Form for managing standards attestations
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- the standards attestation
Form for selecting currencies
Form for selecting form fields
Form for managing package currencies
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- None
Form for generating forms
Form for custom documents
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- the document
Form for orders
Form for private images
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- the image
Form for media files
Save the form
Parameters:
-
commit: whether to commit or not
Returns:
- the media file
Helper function to render choices
Parameters:
-
choices: the choices to render
Returns:
- the rendered choices
Allows creation of a package.
Parameters:
-
request: the request object -
initiative: the initiative object
Returns:
- the response object
Allows creation of a package.
Parameters:
-
request: the request object -
initiative: the initiative object -
banding_type_id: the banding type id
Returns:
- the response object
Allows creation or editing of a package.
Parameters:
-
request: the request object -
initiative: the initiative object -
package_id: the package id
Returns:
- the response object
List all meta packages
Parameters:
-
request: the request object
Returns:
- the response object
Manage a meta package
Parameters:
-
request: the request object -
package_id: the package id
Returns:
- the response object
A management command that pregenerates package prices
List all media files for a package.
Parameters:
-
request: the request object -
package_id: the package id -
initiative_id: the initiative id
Returns:
- the response object
Download a media file.
Parameters:
-
request: the request object -
package_id: the package id -
initiative_id: the initiative id -
file_id: the file id
Returns:
- the response object
A country represents a country in which a package is available.
A banding type specifies the mode of a Banding (e.g. Jisc Collections)
Returns a string to display in the admin for the is_fte field
Returns:
- A string: "Yes" if is_fte, "No" if not
Sets vocabs for this BandingType
Parameters:
-
ids: a list of IDs to set or unset -
request: the request object
Returns:
- a list of vocabs that were set
Custom manager for Banding
Returns a queryset of Banding objects with related objects
Returns:
- a queryset of Banding objects with related objects
A banding represents a type of banding (e.g. Jisc Band 1) for a package
Returns the name of the banding
Returns:
- the name of the banding
Returns the minimum FTE for this banding
Returns:
- the minimum FTE for this banding
Returns the maximum FTE for this banding
Returns:
- the maximum FTE for this banding
Returns whether this banding is comparable by FTE
Returns:
- True if comparable, otherwise False
Custom manager for Price
Returns a queryset of Price objects with related objects
Returns:
- a queryset of Price objects with related objects
A price point for a Banding in a particular currency. Loosely coupled with BandingTypeCurrencyEntry
A garbage collector for orphaned prices
Returns:
- None
Ties a currency to a BandingTypeEntry
This model glues a package to a banding type. If this exists, then a package has selected to use a particular banding type. E.g. Open Book Pub using Jisc Collections.
Abstract base class for Package and PackageHistory
Return the highlights for this package
Returns:
- a queryset of highlights
A package is a collection of content that can be purchased by a customer.
Returns a full list of stored field answers for this package. These are not guaranteed accessible for any particular signup.
Returns:
- A list of fields
Returns a string to display in the admin for the active field
Returns:
- A string: "Yes" if active, "No" if not
Sets contacts for this package
Parameters:
-
ids: a list of IDs to set or unset -
contact_type: The ManyToMany field on which to operate. Should be either signup_contacts or access_contacts
Returns:
- None
Saves the price data
Parameters:
-
form: the form to save
Returns:
- None
This returns a dictionary of BandingTypeCurrencyEntries that contains a dictionary of countries that contains a list of prices E.g. price_bandings[BandingTypeCurrencyEntry][Country] = [Prices]
Returns:
- a dictionary of BandingTypeCurrencyEntries that contains
Gets a display string of the pricing for this package
Returns:
- a string of pricing display
Returns a list of meta packages that this package is a part of
Returns:
- set of meta packages
Returns a QuerySet of standards that this package is certified against
Returns:
- QuerySet of standards
A Meta Package is a collection of packages that are grouped together
Returns a set of initiatives that this meta package is a part of
Returns:
- a set of initiatives
Returns a dictionary of standards for which this meta package is certified
Returns:
- a dictionary of standards
A link between a package and a meta package
A basket is a collection of packages and meta packages that a user has
Returns a set of packages that are in this basket
Returns:
- a set of packages
Checks if the packages and meta_packages conflict with one another.
Returns a set of packages that conflict with one another
Returns:
- a set of packages
Returns the cost of the basket
Parameters:
-
identifier: the user or country to get the cost for -
identifier_type: the type of identifier
Returns:
- tuple of the cost of the basket and currency totals
Returns a dict of standards covered by the packages in this basket.
Returns the best bandings for the form
Parameters:
-
identifier: the user or country to get the cost for -
identifier_type: the type of identifier
Returns:
- the cost of the basket
A form that aggregates multiple forms together.
A form element that can be used in an aggregate form.
Return the choices for this element as a list.
Returns:
- None
A form element that can be used in an aggregate form.
Creates a snapshot of the element
Parameters:
-
answer: the answer to snapshot
Returns:
- the snapshot
An answer to an aggregate assignment.
Returns the frozen element
Returns:
- the element
A snapshot of a form element at the time an answer is created
An answer to an aggregate form.
A form element that can be used in a package form.
A document associated with a package (e.g. a contract)
Duplicating this object including copying the file
Returns:
- the historical record
A frozen document associated when a package is bought (e.g. a set of merged PDF contracts)
A document associated with a package (e.g. a contract)
An old version of an existing PackageDocument.
Reverts the package document to this historical version
Returns:
- None
An answer to an order form.
This model links a form answer to a signup
An order for a package.
Returns the currency totals for a completed order
Returns:
- dict
This function takes a list of signups and saves a list of dicts
Parameters:
-
signups: list of signups
Returns:
- None
Returns a list of dicts containing the order form details
Returns:
- list of dicts
Returns true if the user has a payment processor for this order
Parameters:
-
user: the user to check
Returns:
- bool
Returns a set of packages associated with this order
Returns:
- set
Returns an OrderedSet of the field names that will be collected for this basket
Returns:
- OrderedSet
Saves the order form
Parameters:
-
form: the form to save
Returns:
- None
Rebuilds the docs for this order
Parameters:
-
request: the request
Returns:
- None
A signup to a package
Returns a redirect field if one exists
Returns:
- str
Returns a redirect field if one exists
Returns:
- str
Returns a full list of stored field answers for this signup. These should be guaranteed accessible for this signup.
Returns:
- A list of fields
Returns a stored answer or empty string if it does not exist
Parameters:
-
field: The field name
Returns:
- str
Returns a dict of stored answers
Returns:
- QuerySet of PackageSignupOrderFormAnswer
Returns the payment processor for this signup
Returns:
- str
Returns a formatted price
Returns:
- str
Returns a formatted price
Returns:
- str
A media file for a package
Returns the mime type of the file
Returns:
- str
Unlinks the file from the filesystem
Returns:
- None
Serve a file
Returns:
- HttpResponse
Upload path for package images
Parameters:
-
instance: the instance of the model -
filename: the filename of the file
Returns:
- the path to upload the file to
Returns the choices for the kind of element
Returns:
- the choices
Returns the choices for the width of the element
Returns:
- the choices
List all orders.
Parameters:
-
request: the request
Returns:
- the response
Detail view for an order.
Parameters:
-
request: the request -
order_id: the order id
Returns:
- the response
Edit or create an order.
Parameters:
-
request: the request -
order_id: the order id
Returns:
- the response
List all orders for an initiative.
Parameters:
-
request: the request -
initiative: the initiative
Returns:
- the response
Create an order for an initiative.
Parameters:
-
request: the request -
initiative: the initiative -
order_id: the order id
Returns:
- the response
Detail view for an order.
Parameters:
-
request: the request -
initiative: the initiative -
order_id: the order id
Returns:
- the response
Add an image to an order.
Parameters:
-
request: the request -
order_id: the order id
Returns:
- the response
Serve an image from an order.
Parameters:
-
request: the request -
order_id: the order id -
image_id: the image id
Returns:
- the response
Add a package to an order.
Parameters:
-
request: the request -
order_id: the order id -
initiative: the initiative
Returns:
- the response
A signal receiver that runs the price garbage collector
Parameters:
-
sender: the sender of the signal -
kwargs: the keyword arguments
Returns:
- None
When all PackageSignup objects have been approved by Org and Inits update the package status.
Parameters:
-
sender: the sender -
instance: the instance -
kwargs: the kwargs
Returns:
- None
Returns a string describing the conflict between the package and the basket.
Parameters:
-
package: the package to check for conflicts -
basket: the basket to check for conflicts
Returns:
- a string describing the conflict between the package and the basket
Formats the price using the currency.
Parameters:
-
value: the price to format -
currency: the currency to use
Returns:
- the formatted price
This function is used to explain the price calculation for a given package
Parameters:
-
package: the package to calculate the price for -
identifier: the user or session to calculate the price for -
identifier_type: the type of identifier (user or session)
Returns:
- a tuple of the price, banding and explanation
This function is used to calculate the price for a given package
Parameters:
-
package: the package to calculate the price for -
identifier: the user or session to calculate the price for -
identifier_type: the type of identifier (user or session) -
country: the country to calculate the price for -
explain: whether to return an explanation of the price calculation
Returns:
- a tuple of the price, banding and explanation
This function is used to fetch a price
Parameters:
-
banding: the banding to fetch the price for -
country: the country to fetch the price for -
explanation: the explanation of the price calculation
Returns:
- a tuple of the explanation and the price
This function is used to use the default pricing
Parameters:
-
banding: the banding to use the default pricing for -
explanation: the explanation of the price calculation
Returns:
- a tuple of the explanation and the price
This function is used to fall back to the default pricing
Parameters:
-
banding: the banding to fall back to the default pricing for -
bandings: the bandings to fall back to the default pricing for -
explanation: the explanation of the price calculation -
fte: the FTE to fall back to the default pricing for -
package: the package to fall back to the default pricing for
Returns:
- a tuple of the banding and the explanation
This function is used to get the user
Parameters:
-
band_filter: the band filter -
banding_choice: the banding choice -
explanation: the explanation of the price calculation -
fte: the FTE -
identifier: the identifier -
identifier_type: the identifier type -
package: the package
Returns:
- a tuple of the banding choice, explanation and FTE
This function is used to get the band filter
Parameters:
-
band_filter: the band filter -
country: the country -
explanation: the explanation of the price calculation -
package: the package
Returns:
- a tuple of the band filter, country and explanation
This function is used to handle a user without a banding
Parameters:
-
band_filter: the band filter -
banding: the banding object -
banding_choice: the banding choice -
bandings: the bandings -
explanation: the explanation of the price calculation -
package: the package
Returns:
- a tuple of the banding and the explanation
This function is used to check the default currency and FTE
Parameters:
-
band_filter: the band filter -
bandings: the bandings -
explanation: the explanation of the price calculation -
fte: the FTE -
package: the package
Returns:
- a tuple of the banding and the explanation
This function is used to check for a catch-all price
Parameters:
-
band_filter: the band filter -
country: the country -
explanation: the explanation of the price calculation -
package: the package
Returns:
- a tuple of the band filter, bandings, country and explanation
This function is used to find a user from a session
Parameters:
-
band_filter: the band filter -
explanation: the explanation of the price calculation -
identifier: the identifier -
package: the package
Returns:
- a tuple of the banding choice, explanation and FTE
This function is used to find a user in the database
Parameters:
-
band_filter: the band filter -
explanation: the explanation of the price calculation -
identifier: the identifier -
package: the package
Returns:
- a tuple of the banding choice, explanation and FTE
This function is used to explain a catch-all band filter
Parameters:
-
band_filter: the band filter -
explanation: the explanation of the price calculation -
package: the package
Returns:
- a tuple of the banding and the explanation
This function is used to match a price to a code
Parameters:
-
band_filter: the band filter -
country: the country (code) -
explanation: the explanation of the price calculation -
package: the package
Returns:
- a tuple of the band filter, country and explanation
This function is used to handle a band filter
Parameters:
-
band_filter: the band filter -
explanation: the explanation of the price calculation -
package: the package
Returns:
- a tuple of the banding and the explanation
This function is used to test the country
Parameters:
-
band_filter: the band filter -
country: the country -
explanation: the explanation of the price calculation -
package: the package
Returns:
- a tuple of the band filter and the explanation
This function is used to generate the table rows for the provisional page
Parameters:
-
order: the order to generate the table rows for
Returns:
- a dictionary of table rows
This function is used to unlink a frozen document
Parameters:
-
order: the order to unlink the frozen document for
Returns:
- None
This function is used to generate a zip file of the documents for a given
Parameters:
-
order: the order to generate the zip file for -
request: the request object
Returns:
- the frozen document
This function is used to check a basket for disabled signups
Parameters:
-
request: the request object -
basket: the basket to check
Returns:
- an error message if there is one, otherwise None
This function is used to send a new order notification
Parameters:
-
order: the order to send the notification for -
request: the request object -
identifier: the identifier -
identifier_type: the identifier type
Returns:
- None
This function is used to send an order complete notification
Parameters:
-
order: the order to send the notification for -
request: the request object
Returns:
- None
This function is used to format a price
Parameters:
-
cost: the cost to format -
currency: the currency to format
Returns:
- the formatted price
This function is used to calculate the site percentage
Parameters:
-
request: the request object -
total: the total to calculate the site percentage for
Returns:
- a tuple of the site percentage and the site percentage value
This function is used to filter duplicates from costs
Parameters:
-
costs: the costs to filter
Returns:
- the filtered costs
Convert currency totals to a single currency.
Parameters:
-
request: the request object -
identifier_type: the identifier type -
identifier: the identifier -
totals: the totals to convert
Returns:
- a tuple of converted values
This function is used to generate a document
Parameters:
-
request: the request object -
order: the order to generate the document for -
identifier: the identifier -
identifier_type: the identifier type
Returns:
- a tuple of the path and filename of the document
This function is used to generate an acceptance document
Parameters:
-
request: the request object -
order: the order to generate the acceptance document for -
identifier: the identifier -
identifier_type: the identifier type
Returns:
- a tuple of the path and filename of the acceptance document
This function is used to add a bold paragraph to a document
Parameters:
-
document: the document to add the paragraph to -
text: the text to add -
secondary_text: the secondary text to add
Returns:
- None
This function is used to get a user's currency
Parameters:
-
identifier: the identifier -
identifier_type: the identifier type
Returns:
- the user's currency
Add pre-calculated min/max prices to package objects.
Parameters:
-
country_code: the country code -
packages: the packages to add pre-calc prices to
Returns:
- the packages with pre-calc prices added
Add pre-calculated min/max prices to meta package objects.
Parameters:
-
country_code: the country code -
packages: the meta packages to add pre-calc prices to
Returns:
- the meta packages with pre-calc prices added
List all initiatives that the user has access to.
Parameters:
-
request: the request
Returns:
- the response
List all collectives that the user has access to.
Parameters:
-
request: the request
Returns:
- the response
Display information about a package.
Parameters:
-
request: the request -
package_id: the package ID
Returns:
- the response
List all signups that the user has access to.
Parameters:
-
request: the request
Returns:
- the response
Process a signup.
Parameters:
-
request: the request -
initiative_id: the initiative ID -
package_id: the package ID -
signup_id: the signup ID
Returns:
- the response
Change the access control for a package.
Parameters:
-
request: the request -
signup_id: the signup ID -
initiative_id: the initiative ID -
access_type: the access type
Returns:
- the response
Display the access control for a package.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID
Returns:
- the response
Delete a standard attestation.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
standard_id: the standard ID
Returns:
- the response
Attest to a standard.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
standard_id: the standard ID
Returns:
- the response
Display the standards for a package.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID
Returns:
- the response
Display the contacts for a package.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID
Returns:
- the response
View the baskets for the user.
Parameters:
-
request: the request
Returns:
- the response
View a basket.
Parameters:
-
request: the request -
basket_id: the basket ID
Returns:
- the response
Manage a basket.
Parameters:
-
request: the request -
package_id: the package ID -
meta_package_id: the meta package ID
Returns:
- the response
Creates the zip files and documents in the document centre
Parameters:
-
request: the request object -
order_id: the order ID that is being checked out
Returns:
- needs to return an HTTP status code
Display an order form
Parameters:
-
request: the request -
order_id: the order ID
Returns:
- an HttpResponse
Display a provisional order.
Parameters:
-
request: the request -
order_id: the order ID
Returns:
- an HttpResponse
Display a completed order.
Parameters:
-
request: the request -
order_id: the order ID
Returns:
- an HttpResponse
Remove a package from a basket.
Parameters:
-
request: the request -
basket_id: the basket ID -
package_id: the package ID -
meta_package_id: the meta package ID
Returns:
- an HttpResponse
This function lists all the form elements
Parameters:
-
request: request object
Returns:
- HttpResponse object
This function deletes a form element
Parameters:
-
request: request object -
form_element_id: the form element_id to delete
Returns:
- HttpResponse object
This function deletes an affiliation of a form element with a package
Parameters:
-
request: request object -
initiative_id: the initiative ID -
package_id: the package ID -
form_element_id: the form element_id to delete
Returns:
- HttpResponse object
This function creates a new form element
Parameters:
-
request: request object -
form_element_id: the form element_id to edit
Returns:
- HttpResponse object
This function lists all the packages awaiting approval
Parameters:
-
request: request object
Returns:
- HttpResponse object
Reorders the Form Elements list, posted via AJAX.
Parameters:
-
request: HttpRequest object
Returns:
- HttpResponse object
List the documents for a package.
Parameters:
-
request: the request -
initiative_id: the initiative ID -
package_id: the package ID
Returns:
- the response
List the form elements for a package.
Parameters:
-
request: the request -
initiative_id: the initiative ID -
package_id: the package ID
Returns:
- the response
Debug the price of a package.
Parameters:
-
request: the request
Returns:
- the response
Add a document to a package.
Parameters:
-
request: the request -
initiative_id: the initiative ID -
package_id: the package ID
Returns:
- the response
View a document.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
document_id: the document ID
Returns:
- the response
Delete a document.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
document_id: the document ID
Returns:
- the response
Upload a new document.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
document_id: the document ID
Returns:
- the response
Revert a document to a previous version.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
document_id: the document ID
Returns:
- the response
Delete a package.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID
Returns:
- the response
Delete a package banding.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
banding_id: the banding ID
Returns:
- the response
delete_package_banding_currency(request, package_id, initiative_id, banding_id, banding_currency_id)
Delete a package banding currency.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
banding_id: the banding ID -
banding_currency_id: the banding currency ID
Returns:
- the response
Manage the bandings for a package.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID
Returns:
- the response
Edit the redirect for a banding.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
banding_id: the banding ID
Returns:
- the response
Manage the currencies for a package banding.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
banding_id: the banding ID
Returns:
- the response
manage_package_banding_currencies_prices(request, package_id, initiative_id, banding_id, currency_id)
Manage the prices for a package banding currency.
Parameters:
-
request: the request -
package_id: the package ID -
initiative_id: the initiative ID -
banding_id: the banding ID -
currency_id: the currency ID
Returns:
- the response
Download a document for an order.
Parameters:
-
request: the request -
order_id: the order ID
Returns:
- the response
Show the new order complete page.
Parameters:
-
request: the request -
order_id: the order ID
Returns:
- the response
Get initiative from package or initiative identifier
Parameters:
-
package_or_initiative: type of identifier -
identifier: the identifier
Returns:
- initiative
Summary page for package or initiative
Parameters:
-
request: the request -
package_or_initiative: type of identifier -
identifier: the identifier
Returns:
- the response
Summary page for package or initiative
Parameters:
-
request: the request -
package_or_initiative: type of identifier -
identifier: the identifier
Returns:
- the response
Summary page for package or initiative
Parameters:
-
request: the request -
package_or_initiative: type of identifier -
identifier: the identifier
Returns:
- the response
Summary page for meta package
Parameters:
-
request: the request -
package_id: the package id
Returns:
- the response
A management command that syncs Thoth entries to the local database
A management command that syncs Thoth entries to the local database
Parameters:
-
args: command line arguments -
options: command line options
Generate stats for the database
Returns:
- None
A management command that installs BIC code support
A management command that installs Bisac code support
(c) ΔQ Programming LLP, 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
A management command that fetches and installs the latest ROR support
A management command that installs Thema code support
A management command that syncs Thoth entries to the local database
A management command that syncs Thoth entries to the local database
Parameters:
-
args: command line arguments -
options: command line options
A management command that syncs Thoth entries to the local database
A management command that syncs Thoth entries to the local database
Parameters:
-
args: command line arguments -
options: command line options
Syncs Thoth entries to the local database
Returns:
- None
Runs the sync
Parameters:
-
ret_text: the return text
Returns:
- None
dot.notation access to dictionary attributes
A management command that syncs Thoth entries to the local database
A management command that tests Thoth sync is working with minimal database interaction
Parameters:
-
args: command line arguments -
options: command line options
Outputs text to the console and to the return text
Parameters:
-
text: the text to output -
ret_text: the return text
Returns:
- None
Tests that Thoth sync is working with minimal database interaction
Returns:
- None
A publisher in Thoth
A model to store stats about the Thoth database
A model to store overall stats about the Thoth database
A model to store country stats
A BIC subject code
A BISAC subject code
A Thema subject code
A manager for Thoth Work objects
Get optimized queryset for Thoth Work objects excluding book chapters.
Returns:
- queryset with prefetched related objects
A work in Thoth
REST export URL for this Thoth instance. Replaces "api" with "export"
Returns:
- a string of the export url
A model to store notifications about new works
Notify users of new books
Returns:
- None
Returns a dictionary of profiles and works of which to notify
Returns:
- a dictionary of profiles and works
A subject code for a work
Display a code and heading for this subject
Returns:
- a string of the code and heading
A contributor
A contribution to a work
A search in Thoth
Returns results for this search
Parameters:
-
elements: an optional list of elements to parse instead of those associated with this entry in the database
Returns:
- a queryset of Works or None
A record corresponding to an ROR record
An institution
A funding record
A search element in Thoth
Returns a string of the type of search
Returns:
- a string of the type of search
Generate a Q query for this search method
Returns:
- a tuple of Q queries for Works, Contributor, and Contribution
A decorator that allows for JSONP callbacks
Parameters:
-
func: The function to decorate
Returns:
- The decorated function
Display a single book
Parameters:
-
request: the request object -
book_id: the book id
Returns:
- the response
Display a list of saved searches
Parameters:
-
request: the request object
Returns:
- the response
Delete a saved search
Parameters:
-
request: the request object -
search_id: the search id
Returns:
- the response
Run a saved search
Parameters:
-
request: the request object -
search_id: the search id
Returns:
- the response
Toggle email on new result
Parameters:
-
request: the request object -
search_id: the search id
Returns:
- the response
Run the Thoth driver
Parameters:
-
request: the request object
Returns:
- the response
Display a list of books by ROR ID
Parameters:
-
request: the request object -
ror_id: the ROR ID
Returns:
- the response
Display a list of all books
Parameters:
-
request: the request object
Returns:
- the response
Display the advanced search page
Parameters:
-
request: the request object
Returns:
- the response
Add a search term to the current search
Parameters:
-
current_search: the current search -
elements: the elements -
search_terms_split: the search terms, split -
search_type: the type of search
Returns:
- None
Return a list of ROR institutions
Parameters:
-
request: the request object
Returns:
- the response
GraphQL client for Thoth
GraphQL client for Thoth
(c) Open Book Publishers, February 2020 This programme is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
Authentication handler
Perform an authentication request
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
A command line interface for the Thoth python API client. This tool allows you to query a Thoth API for publications, works, authors and other endpoints.
Retrieves a contribution by ID from a Thoth instance
Parameters:
-
str contribution_id: the contributor to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.contributions(int limit, int order, int offset, str publishers, str contribution_type, bool raw, str version, str endpoint, bool serialize)
Retrieves contributions from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str contribution_type: the contribution type (e.g. AUTHOR) -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.contribution_count(str publishers, str search, bool raw, str version, str contribution_type, str endpoint)
Retrieves a count of contributions from a Thoth instance
Parameters:
-
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str contribution_type: the work type (e.g. AUTHOR) -
str endpoint: a custom Thoth endpoint
Retrieves a contributor by ID from a Thoth instance
Parameters:
-
str contributor_id: the contributor to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.contributors(int limit, int order, int offset, str search, bool raw, str version, str endpoint, bool serialize)
Retrieves contributors from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
Retrieves a count of contributors from a Thoth instance
Parameters:
-
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint
Retrieves an institution by ID from a Thoth instance
Parameters:
-
str institution_id: the institution to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.institutions(int limit, int order, int offset, str search, bool raw, str version, str endpoint, bool serialize)
Retrieves institutions from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
Retrieves a count of funders from a Thoth instance
Parameters:
-
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint
Retrieves a funding by ID from a Thoth instance
Parameters:
-
str funding_id: the funding to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.fundings(int limit, int order, int offset, str publishers, bool raw, str version, str endpoint, bool serialize)
Retrieves fundings from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
Retrieves a count of fundings from a Thoth instance
Parameters:
-
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint
Retrieves an imprint by ID from a Thoth instance
Parameters:
-
str imprint_id: the imprint to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.imprints(int limit, int order, int offset, str publishers, str search, bool raw, str version, str endpoint, bool serialize)
Retrieves imprints from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
Retrieves a count of imprints from a Thoth instance
Parameters:
-
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint
Retrieves an issue by ID from a Thoth instance
Parameters:
-
str issue_id: the issue to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.issues(int limit, int order, int offset, str publishers, str search, bool raw, str version, str endpoint, bool serialize)
Retrieves issues from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
Retrieves a count of issues from a Thoth instance
Parameters:
-
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint
Retrieves a language by ID from a Thoth instance
Parameters:
-
str language_id: the language to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.languages(int limit, int order, int offset, str publishers, str search, bool raw, str version, str endpoint, bool serialize, language_relation, language_codes)
Retrieves languages from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object -
language_relation: select by language relation (e.g. ORIGINAL) -
language_codes: select by language code (e.g. ADA)
Retrieves a count of languages from a Thoth instance
Parameters:
-
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
language_codes: the code to retrieve (e.g. CHI) -
language_relation: the relation (e.g. ORIGINAL)
Retrieves a price by ID from a Thoth instance
Parameters:
-
str price_id: the price to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.prices(int limit, int order, int offset, str publishers, bool raw, str version, str endpoint, bool serialize, str currency_codes)
Retrieves prices from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object -
str currency_codes: the currency code (e.g. GBP)
Retrieves a count of prices from a Thoth instance
Parameters:
-
str currency_codes: the currency to search by (e.g. GBP) -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint
Retrieves a publication by id from a Thoth instance
Parameters:
-
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object -
str publication_id: a publicationId to retrieve
ThothAPI.publications(int limit, int order, int offset, str publishers, str search, str publication_types, bool raw, str version, str endpoint, bool serialize)
Retrieves publications from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
str publication_types: the work type (e.g. PAPERBACK) -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.publication_count(str publishers, str search, bool raw, str version, str publication_types, str endpoint)
Retrieves a count of publications from a Thoth instance
Parameters:
-
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str publication_types: the work type (e.g. MONOGRAPH) -
str endpoint: a custom Thoth endpoint
Retrieves a publisher by ID from a Thoth instance
Parameters:
-
str publisher_id: the publisher to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.publishers(int limit, int order, int offset, str publishers, str search, bool raw, str version, str endpoint, bool serialize)
Retrieves publishers from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
Retrieves a count of publishers from a Thoth instance
Parameters:
-
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint
Retrieves a reference by ID from a Thoth instance
Parameters:
-
str reference_id: the series to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.references(int limit, int order, int offset, str publishers, str search, bool raw, str version, str endpoint, bool serialize)
Retrieves references from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
Retrieves a series by ID from a Thoth instance
Parameters:
-
str series_id: the series to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.serieses(int limit, int order, int offset, str publishers, str search, bool raw, str version, str endpoint, bool serialize, series_types)
Retrieves serieses from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object -
series_types: the type of serieses to return (e.g. BOOK_SERIES)
ThothAPI.series_count(str publishers, str search, bool raw, str version, str series_types, str endpoint)
Retrieves a count of serieses from a Thoth instance
Parameters:
-
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str series_types: the work type (e.g. BOOK_SERIES) -
str endpoint: a custom Thoth endpoint
Retrieves a subject by ID from a Thoth instance
Parameters:
-
str subject_id: the subject to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.subjects(int limit, int order, int offset, str publishers, str search, bool raw, str version, str endpoint, bool serialize, subject_types)
Retrieves subjects from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object -
subject_types: select by subject code (e.g. BIC)
Retrieves a count of subjects from a Thoth instance
Parameters:
-
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
str subject_types: the type to retrieve (e.g. BIC) -
str search: a search
Retrieves a list of supported Thoth versions @return: a list of supported Thoth versions
ThothAPI.work(str doi, bool raw, str version, str endpoint, bool serialize, str work_id, bool cover_ascii)
Retrieves a work by DOI or ID from a Thoth instance
Parameters:
-
str doi: the doi to fetch -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object -
str work_id: a workId to retrieve -
bool cover_ascii: whether to render an ASCII art cover
ThothAPI.works(int limit, int order, int offset, str publishers, str search, str work_types, str work_status, bool raw, str version, str endpoint, bool serialize)
Retrieves works from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
str work_types: the work type (e.g. MONOGRAPH) -
str work_status: the work status (e.g. ACTIVE) -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
ThothAPI.work_count(str publishers, str search, bool raw, str version, str work_types, str work_status, str endpoint)
Retrieves a count of works from a Thoth instance
Parameters:
-
str publishers: a list of publishers to limit by -
str search: a search string to search -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str work_types: the work type (e.g. MONOGRAPH) -
str work_status: the work status (e.g. ACTIVE) -
str endpoint: a custom Thoth endpoint
ThothAPI.books(int limit, int order, int offset, str publishers, str search, str work_status, bool raw, str version, str endpoint, bool serialize)
Retrieves books from a Thoth instance
Parameters:
-
int limit: the maximum number of results to return -
int order: a GraphQL order query statement -
int offset: the offset from which to retrieve results -
str publishers: a list of publishers to limit by -
str search: a search string to search -
str work_status: the work status (e.g. ACTIVE) -
bool raw: whether to return a python object or the raw result -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint -
bool serialize: return a pickled python object
Update the work cover by DOI or ID
Parameters:
-
str doi: the doi of the work -
str work_id: the workId of the work -
str url: the cover URL of the work -
str version: a custom Thoth version -
str endpoint: a custom Thoth endpoint
GraphQL client for Thoth
(c) Open Book Publishers, February 2020 and (c) ΔQ Programming LLP, July 2021 This programme is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
Client to Thoth's GraphQL API
Obtain an authentication token
Instantiate a thoth mutation and execute it
Instantiate a thoth query and execute
Construct and trigger a mutation to add a new publisher object
Construct and trigger a mutation to add a new imprint object
Construct and trigger a mutation to add a new work object
Construct and trigger a mutation to add a new publication object
Construct and trigger a mutation to add a new price object
Construct and trigger a mutation to add a new language object
Construct and trigger a mutation to add a new subject object
Construct and trigger a mutation to add a new series object
Construct and trigger a mutation to add a new issue object
Construct and trigger a mutation to add a new contributor object
Construct and trigger a mutation to add a new contribution object
Construct and trigger a mutation to add a new affiliation object
Construct and trigger a mutation to add a new institution object
Construct and trigger a mutation to add a new location object
Construct and trigger a mutation to add a new funding object
Construct and trigger a mutation to add a new work relation object
Construct and trigger a mutation to add a new reference object
Construct and trigger a mutation to update a work object
Construct and trigger a mutation to update an institution object
Shows the versions of Thoth that this API supports @return: a list of version strings
GraphQL client for Thoth
(c) Open Book Publishers, February 2020 This programme is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
Exception to report Thoth errors
(c) ΔQ Programming LLP, July 2021 This file is free software; you may redistribute and/or modify it under the terms of the MIT License.
This file is adapted from the Simple GraphQL client for Python 2.7+ https://github.com/prisma-labs/python-graphql-client
The modifications here change the library to use the requests framework instead of urllib. This means that we can then mock requests more easily in unit tests.
The MIT License (MIT)
Copyright (c) 2016 graph.cool, ΔQ Programming LLP, July 2021
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
GraphQL client for Thoth
(c) Open Book Publishers, February 2020 This programme is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
GraphQL mutation in Thoth Mutations are specified in the MUTATIONS list, which specifies their fields and desired return value 'fields' must be a list of tuples (str, bool) where the string represents the attribute and the boolean represents whether the values should be enclosed with quotes and sanitised. Each mutation must have a return_value. Normally this is the primary key of that object, but in some cases, when we don't need to use the return value, we simply specify any field that can be returned in that mutation (e.g. createContribution).
Format the mutation request string
Perform the GraphQL mutation and report any errors
Returns a set of mutation statements based on object attributes.
GraphQL client for Thoth
(c) Open Book Publishers, February 2020 This programme is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
GraphQL query in Thoth Queries are specified in the QUERIES list of the API version, which specifies their fields and desired return value 'fields' must be a list of tuples (str, bool) where the string represents the attribute and the boolean represents whether the values should be enclosed with quotes and sanitised.
Format the query request string
Perform the GraphQL query and report any errors
Returns a string with all query parameters.
Returns a string with all query fields.
Returns the GraphQL endpoint name of which the query name is an alias, if any.
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
The client for Thoth 0.4.2
Returns a contribution by ID @param contribution_id: the contribution ID @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a contributions list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param contribution_type: the contribution type (e.g. AUTHOR) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a count of contributions @param search: a search string @param publishers: a list of publishers @param contribution_type: a contribution type (e.g. AUTHOR) @param raw: whether to return a raw result @return: a count of contributions
Returns a contributor by ID @param contributor_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns contributors @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param search: a filter string to search @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return a count of contributors @param search: a search string @param raw: whether to return the raw result @return: a count of contributors
Returns a funder by ID @param funder_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return funders @param limit: the limit on the number of results @param offset: the offset from which to start @param order: the order of results @param search: a search string @param raw: whether to return raw result @return: an object or raw result
A count of funders @param search: a search string @param raw: whether to return raw result @return: a count of funders
Returns a funding by ID @param funding_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a fundings list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of fundings @param raw: whether to return a raw result @return: a count of fundings
Return an imprint @param imprint_id: the imprint @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return imprints @param limit: the limit on the number of results returned @param offset: the offset from which to begin @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers by which to limit the query @param raw: whether to return a raw result @return: an object or raw result
A count of imprints @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of imprints
Returns an issue by ID @param issue_id: the issue @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return issues @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit results @param raw: whether to return a raw response @return: an object or raw response
A count of issues @param raw: whether to return a raw result @return: a count of issues
Returns a language by ID @param language_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return languages @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @param language_code: the language code to query @param language_relation: the language relation to query (e.g. ORIGINAL) @return: an object or raw result
A count of languages @param language_code: a language code (e.g. CHI) @param language_relation: a language relation (e.g. ORIGINAL) @param raw: whether to return a raw result @return: a count of languages
Returns a price by ID @param price_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns prices @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param currency_code: the currency code (e.g. GBP) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of prices @param currency_code: a currency code (e.g. GBP) @param raw: whether to return a raw result @return: a count of prices
Returns a publication by ID @param publication_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns publications @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param publication_type: the work type (e.g. PAPERBACK) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of publications @param search: a search string @param publishers: a list of publishers by which to limit the result @param publication_type: the publication type (e.g. PAPERBACK) @param raw: whether to return a raw result @return: a count of publications
Returns a publisher by ID @param publisher_id: the publisher @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return publishers @param limit: the limit on the number of results @param offset: the offset from which to begin @param order: the order for the returned results @param search: a search string @param publishers: a list of publishers by which to limit the results @param raw: whether to return a raw result @return: an object or raw result
Return a count of publishers @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of publishers
Returns a series by ID @param series_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return serieses @param limit: the limit on the number of results to retrieve @param offset: the offset from which to start @param order: the order in which to present the results @param search: a search string @param publishers: a list of publishers by which to limit results @param series_type: the series type (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: an object or raw result
Return a count of serieses @param search: a search string @param publishers: a list of publishers by which to limit the results @param series_type: the type of series (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: a count of serieses
Returns a subject by ID @param subject_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return subjects @param limit: a limit on the number of results @param offset: the offset from which to retrieve results @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers @param raw: whether to return a raw result @param subject_type: the subject type (e.g. BIC) @return: subjects
A count of subjects @param subject_type: the type of subject @param search: a search string @param raw: whether to return a raw result @return: a count of subjects
Returns works @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_type: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a work by DOI @param doi: the DOI to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a work by ID @param work_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
A count of works @param search: a search string @param publishers: a list of publishers by which to limit results @param work_type: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a raw result @return: a count of works
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
A class to build a Thoth object structure
Creates an object structure from dictionary input @return: an object
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
The client for Thoth 0.4.2
Returns a contribution by ID @param contribution_id: the contribution ID @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a contributions list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param contribution_type: the contribution type (e.g. AUTHOR) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a count of contributions @param search: a search string @param publishers: a list of publishers @param contribution_type: a contribution type (e.g. AUTHOR) @param raw: whether to return a raw result @return: a count of contributions
Returns a contributor by ID @param contributor_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns contributors @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param search: a filter string to search @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return a count of contributors @param search: a search string @param raw: whether to return the raw result @return: a count of contributors
Returns a funder by ID @param funder_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return funders @param limit: the limit on the number of results @param offset: the offset from which to start @param order: the order of results @param search: a search string @param raw: whether to return raw result @return: an object or raw result
A count of funders @param search: a search string @param raw: whether to return raw result @return: a count of funders
Returns a funding by ID @param funding_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a fundings list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of fundings @param raw: whether to return a raw result @return: a count of fundings
Return an imprint @param imprint_id: the imprint @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return imprints @param limit: the limit on the number of results returned @param offset: the offset from which to begin @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers by which to limit the query @param raw: whether to return a raw result @return: an object or raw result
A count of imprints @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of imprints
Returns an issue by ID @param issue_id: the issue @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return issues @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit results @param raw: whether to return a raw response @return: an object or raw response
A count of issues @param raw: whether to return a raw result @return: a count of issues
Returns a language by ID @param language_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return languages @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @param language_code: the language code to query @param language_relation: the language relation to query (e.g. ORIGINAL) @return: an object or raw result
A count of languages @param language_code: a language code (e.g. CHI) @param language_relation: a language relation (e.g. ORIGINAL) @param raw: whether to return a raw result @return: a count of languages
Returns a price by ID @param price_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns prices @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param currency_code: the currency code (e.g. GBP) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of prices @param currency_code: a currency code (e.g. GBP) @param raw: whether to return a raw result @return: a count of prices
Returns a publication by ID @param publication_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns publications @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param publication_type: the work type (e.g. PAPERBACK) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of publications @param search: a search string @param publishers: a list of publishers by which to limit the result @param publication_type: the publication type (e.g. PAPERBACK) @param raw: whether to return a raw result @return: a count of publications
Returns a publisher by ID @param publisher_id: the publisher @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return publishers @param limit: the limit on the number of results @param offset: the offset from which to begin @param order: the order for the returned results @param search: a search string @param publishers: a list of publishers by which to limit the results @param raw: whether to return a raw result @return: an object or raw result
Return a count of publishers @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of publishers
Returns a series by ID @param series_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return serieses @param limit: the limit on the number of results to retrieve @param offset: the offset from which to start @param order: the order in which to present the results @param search: a search string @param publishers: a list of publishers by which to limit results @param series_type: the series type (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: an object or raw result
Return a count of serieses @param search: a search string @param publishers: a list of publishers by which to limit the results @param series_type: the type of series (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: a count of serieses
Returns a subject by ID @param subject_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return subjects @param limit: a limit on the number of results @param offset: the offset from which to retrieve results @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers @param raw: whether to return a raw result @param subject_type: the subject type (e.g. BIC) @return: subjects
A count of subjects @param subject_type: the type of subject @param search: a search string @param raw: whether to return a raw result @return: a count of subjects
Returns works @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_type: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a work by DOI @param doi: the DOI to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a work by ID @param work_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
A count of works @param search: a search string @param publishers: a list of publishers by which to limit results @param work_type: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a raw result @return: a count of works
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
A class to build a Thoth object structure
Creates an object structure from dictionary input @return: an object
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
The client for Thoth 0.4.2
Returns a contribution by ID @param contribution_id: the contribution ID @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a contributions list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param contribution_type: the contribution type (e.g. AUTHOR) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a count of contributions @param search: a search string @param publishers: a list of publishers @param contribution_type: a contribution type (e.g. AUTHOR) @param raw: whether to return a raw result @return: a count of contributions
Returns a contributor by ID @param contributor_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns contributors @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param search: a filter string to search @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return a count of contributors @param search: a search string @param raw: whether to return the raw result @return: a count of contributors
Returns an institution by ID @param funder_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return institutions @param limit: the limit on the number of results @param offset: the offset from which to start @param order: the order of results @param search: a search string @param raw: whether to return raw result @return: an object or raw result
A count of funders @param search: a search string @param raw: whether to return raw result @return: a count of funders
Returns a funding by ID @param funding_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a fundings list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of fundings @param raw: whether to return a raw result @return: a count of fundings
Return an imprint @param imprint_id: the imprint @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return imprints @param limit: the limit on the number of results returned @param offset: the offset from which to begin @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers by which to limit the query @param raw: whether to return a raw result @return: an object or raw result
A count of imprints @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of imprints
Returns an issue by ID @param issue_id: the issue @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return issues @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit results @param raw: whether to return a raw response @return: an object or raw response
A count of issues @param raw: whether to return a raw result @return: a count of issues
Returns a language by ID @param language_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return languages @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @param language_code: the language code to query @param language_relation: the language relation to query (e.g. ORIGINAL) @return: an object or raw result
A count of languages @param language_code: a language code (e.g. CHI) @param language_relation: a language relation (e.g. ORIGINAL) @param raw: whether to return a raw result @return: a count of languages
Returns a price by ID @param price_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns prices @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param currency_code: the currency code (e.g. GBP) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of prices @param currency_code: a currency code (e.g. GBP) @param raw: whether to return a raw result @return: a count of prices
Returns a publication by ID @param publication_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns publications @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param publication_type: the work type (e.g. PAPERBACK) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of publications @param search: a search string @param publishers: a list of publishers by which to limit the result @param publication_type: the publication type (e.g. PAPERBACK) @param raw: whether to return a raw result @return: a count of publications
Returns a publisher by ID @param publisher_id: the publisher @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return publishers @param limit: the limit on the number of results @param offset: the offset from which to begin @param order: the order for the returned results @param search: a search string @param publishers: a list of publishers by which to limit the results @param raw: whether to return a raw result @return: an object or raw result
Return a count of publishers @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of publishers
Returns a series by ID @param series_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return serieses @param limit: the limit on the number of results to retrieve @param offset: the offset from which to start @param order: the order in which to present the results @param search: a search string @param publishers: a list of publishers by which to limit results @param series_type: the series type (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: an object or raw result
Return a count of serieses @param search: a search string @param publishers: a list of publishers by which to limit the results @param series_type: the type of series (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: a count of serieses
Returns a subject by ID @param subject_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return subjects @param limit: a limit on the number of results @param offset: the offset from which to retrieve results @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers @param raw: whether to return a raw result @param subject_type: the subject type (e.g. BIC) @return: subjects
A count of subjects @param subject_type: the type of subject @param search: a search string @param raw: whether to return a raw result @return: a count of subjects
Returns works @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_type: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a work by DOI @param doi: the DOI to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a work by ID @param work_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
A count of works @param search: a search string @param publishers: a list of publishers by which to limit results @param work_type: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a raw result @return: a count of works
(c) ΔQ Programming LLP, November 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
A class to build a Thoth object structure
Creates an object structure from dictionary input @return: an object
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
The client for Thoth 0.4.2
Returns a contribution by ID @param contribution_id: the contribution ID @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a contributions list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param contribution_type: the contribution type (e.g. AUTHOR) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a count of contributions @param search: a search string @param publishers: a list of publishers @param contribution_type: a contribution type (e.g. AUTHOR) @param raw: whether to return a raw result @return: a count of contributions
Returns a contributor by ID @param contributor_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns contributors @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param search: a filter string to search @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return a count of contributors @param search: a search string @param raw: whether to return the raw result @return: a count of contributors
Returns an institution by ID @param funder_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return institutions @param limit: the limit on the number of results @param offset: the offset from which to start @param order: the order of results @param search: a search string @param raw: whether to return raw result @return: an object or raw result
A count of funders @param search: a search string @param raw: whether to return raw result @return: a count of funders
Returns a funding by ID @param funding_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a fundings list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of fundings @param raw: whether to return a raw result @return: a count of fundings
Return an imprint @param imprint_id: the imprint @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return imprints @param limit: the limit on the number of results returned @param offset: the offset from which to begin @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers by which to limit the query @param raw: whether to return a raw result @return: an object or raw result
A count of imprints @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of imprints
Returns an issue by ID @param issue_id: the issue @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return issues @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit results @param raw: whether to return a raw response @return: an object or raw response
A count of issues @param raw: whether to return a raw result @return: a count of issues
Returns a language by ID @param language_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return languages @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @param language_code: the language code to query @param language_relation: the language relation to query (e.g. ORIGINAL) @return: an object or raw result
A count of languages @param language_code: a language code (e.g. CHI) @param language_relation: a language relation (e.g. ORIGINAL) @param raw: whether to return a raw result @return: a count of languages
Returns a price by ID @param price_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns prices @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param currency_code: the currency code (e.g. GBP) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of prices @param currency_code: a currency code (e.g. GBP) @param raw: whether to return a raw result @return: a count of prices
Returns a publication by ID @param publication_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns publications @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param publication_type: the work type (e.g. PAPERBACK) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of publications @param search: a search string @param publishers: a list of publishers by which to limit the result @param publication_type: the publication type (e.g. PAPERBACK) @param raw: whether to return a raw result @return: a count of publications
Returns a publisher by ID @param publisher_id: the publisher @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return publishers @param limit: the limit on the number of results @param offset: the offset from which to begin @param order: the order for the returned results @param search: a search string @param publishers: a list of publishers by which to limit the results @param raw: whether to return a raw result @return: an object or raw result
Return a count of publishers @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of publishers
Returns a series by ID @param series_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return serieses @param limit: the limit on the number of results to retrieve @param offset: the offset from which to start @param order: the order in which to present the results @param search: a search string @param publishers: a list of publishers by which to limit results @param series_type: the series type (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: an object or raw result
Return a count of serieses @param search: a search string @param publishers: a list of publishers by which to limit the results @param series_type: the type of series (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: a count of serieses
Returns a subject by ID @param subject_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return subjects @param limit: a limit on the number of results @param offset: the offset from which to retrieve results @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers @param raw: whether to return a raw result @param subject_type: the subject type (e.g. BIC) @return: subjects
A count of subjects @param subject_type: the type of subject @param search: a search string @param raw: whether to return a raw result @return: a count of subjects
Returns works @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_type: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a work by DOI @param doi: the DOI to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a work by ID @param work_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
A count of works @param search: a search string @param publishers: a list of publishers by which to limit results @param work_type: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a raw result @return: a count of works
(c) ΔQ Programming LLP, November 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
A class to build a Thoth object structure
Creates an object structure from dictionary input @return: an object
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
The client for Thoth 0.4.2
Returns a contribution by ID @param contribution_id: the contribution ID @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a contributions list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param contribution_type: the contribution type (e.g. AUTHOR) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a count of contributions @param search: a search string @param publishers: a list of publishers @param contribution_type: a contribution type (e.g. AUTHOR) @param raw: whether to return a raw result @return: a count of contributions
Returns a contributor by ID @param contributor_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns contributors @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param search: a filter string to search @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return a count of contributors @param search: a search string @param raw: whether to return the raw result @return: a count of contributors
Returns an institution by ID @param funder_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return institutions @param limit: the limit on the number of results @param offset: the offset from which to start @param order: the order of results @param search: a search string @param raw: whether to return raw result @return: an object or raw result
A count of fundings @param raw: whether to return a raw result @return: a count of fundings
Returns a funding by ID @param funding_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a fundings list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Return an imprint @param imprint_id: the imprint @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return imprints @param limit: the limit on the number of results returned @param offset: the offset from which to begin @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers by which to limit the query @param raw: whether to return a raw result @return: an object or raw result
A count of imprints @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of imprints
Returns an issue by ID @param issue_id: the issue @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return issues @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit results @param raw: whether to return a raw response @return: an object or raw response
A count of issues @param raw: whether to return a raw result @return: a count of issues
Returns a language by ID @param language_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return languages @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @param language_codes: the language code to query @param language_relation: the language relation to query (e.g. ORIGINAL) @return: an object or raw result
A count of languages @param language_codes: a language code (e.g. CHI) @param language_relation: a language relation (e.g. ORIGINAL) @param raw: whether to return a raw result @return: a count of languages
Returns a price by ID @param price_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns prices @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param currency_codes: the currency code (e.g. GBP) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of prices @param currency_codes: a currency code (e.g. GBP) @param raw: whether to return a raw result @return: a count of prices
Returns a publication by ID @param publication_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns publications @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param publication_types: the work type (e.g. PAPERBACK) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of publications @param search: a search string @param publishers: a list of publishers by which to limit the result @param publication_types: the publication type (e.g. PAPERBACK) @param raw: whether to return a raw result @return: a count of publications
Returns a publisher by ID @param publisher_id: the publisher @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return publishers @param limit: the limit on the number of results @param offset: the offset from which to begin @param order: the order for the returned results @param search: a search string @param publishers: a list of publishers by which to limit the results @param raw: whether to return a raw result @return: an object or raw result
Return a count of publishers @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of publishers
Returns a series by ID @param series_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return serieses @param limit: the limit on the number of results to retrieve @param offset: the offset from which to start @param order: the order in which to present the results @param search: a search string @param publishers: a list of publishers by which to limit results @param series_types: the series type (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: an object or raw result
Return a count of serieses @param search: a search string @param publishers: a list of publishers by which to limit the results @param series_types: the type of series (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: a count of serieses
Returns a subject by ID @param subject_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return subjects @param limit: a limit on the number of results @param offset: the offset from which to retrieve results @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers @param raw: whether to return a raw result @param subject_types: the subject type (e.g. BIC) @return: subjects
A count of subjects @param subject_types: the type of subject @param search: a search string @param raw: whether to return a raw result @return: a count of subjects
Returns works @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_types: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a work by DOI @param doi: the DOI to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a work by ID @param work_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
A count of works @param search: a search string @param publishers: a list of publishers by which to limit results @param work_types: the work type (e.g. MONOGRAPH) @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a raw result @return: a count of works
Returns books @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of books @param search: a search string @param publishers: a list of publishers by which to limit results @param work_status: the work status (e.g. ACTIVE) @param raw: whether to return a raw result @return: a count of works
(c) ΔQ Programming LLP, November 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
A class to build a Thoth object structure
Creates an object structure from dictionary input @return: an object
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
The client for Thoth 0.9.0
Returns a contribution by ID @param contribution_id: the contribution ID @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a contributions list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param contribution_type: the contribution type (e.g. AUTHOR) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a count of contributions @param search: a search string @param publishers: a list of publishers @param contribution_type: a contribution type (e.g. AUTHOR) @param raw: whether to return a raw result @return: a count of contributions
Returns a contributor by ID @param contributor_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns contributors @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param search: a filter string to search @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return a count of contributors @param search: a search string @param raw: whether to return the raw result @return: a count of contributors
Returns an institution by ID @param funder_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return institutions @param limit: the limit on the number of results @param offset: the offset from which to start @param order: the order of results @param search: a search string @param raw: whether to return raw result @return: an object or raw result
Return a count of institutions @param search: a search string @param raw: whether to return the raw result @return: a count of institutions
A count of fundings @param raw: whether to return a raw result @return: a count of fundings
Returns a funding by ID @param funding_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a fundings list @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Return an imprint @param imprint_id: the imprint @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return imprints @param limit: the limit on the number of results returned @param offset: the offset from which to begin @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers by which to limit the query @param raw: whether to return a raw result @return: an object or raw result
A count of imprints @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of imprints
Returns an issue by ID @param issue_id: the issue @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return issues @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit results @param raw: whether to return a raw response @return: an object or raw response
A count of issues @param raw: whether to return a raw result @return: a count of issues
Returns a language by ID @param language_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return languages @param limit: the limit on the number of results to return @param offset: the offset from which to begin @param order: the order in which to return results @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @param language_codes: the language code to query @param language_relation: the language relation to query (e.g. ORIGINAL) @return: an object or raw result
A count of languages @param language_codes: a language code (e.g. CHI) @param language_relation: a language relation (e.g. ORIGINAL) @param raw: whether to return a raw result @return: a count of languages
Returns a price by ID @param price_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns prices @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param currency_codes: the currency code (e.g. GBP) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of prices @param currency_codes: a currency code (e.g. GBP) @param raw: whether to return a raw result @return: a count of prices
Returns a publication by ID @param publication_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns publications @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param publication_types: the work type (e.g. PAPERBACK) @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of publications @param search: a search string @param publishers: a list of publishers by which to limit the result @param publication_types: the publication type (e.g. PAPERBACK) @param raw: whether to return a raw result @return: a count of publications
Returns a publisher by ID @param publisher_id: the publisher @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return publishers @param limit: the limit on the number of results @param offset: the offset from which to begin @param order: the order for the returned results @param search: a search string @param publishers: a list of publishers by which to limit the results @param raw: whether to return a raw result @return: an object or raw result
Return a count of publishers @param search: a search string @param publishers: a list of publishers by which to limit the result @param raw: whether to return a raw result @return: a count of publishers
Returns a reference by ID @param reference_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return references @param limit: the limit on the number of results @param offset: the offset from which to begin @param order: the order for the returned results @param search: a search string @param publishers: a list of publishers by which to limit the results @param raw: whether to return a raw result @return: an object or raw result
Returns a series by ID @param series_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return serieses @param limit: the limit on the number of results to retrieve @param offset: the offset from which to start @param order: the order in which to present the results @param search: a search string @param publishers: a list of publishers by which to limit results @param series_types: the series type (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: an object or raw result
Return a count of serieses @param search: a search string @param publishers: a list of publishers by which to limit the results @param series_types: the type of series (e.g. BOOK_SERIES) @param raw: whether to return a raw result @return: a count of serieses
Returns a subject by ID @param subject_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Return subjects @param limit: a limit on the number of results @param offset: the offset from which to retrieve results @param order: the order in which to present results @param search: a search string @param publishers: a list of publishers @param raw: whether to return a raw result @param subject_types: the subject type (e.g. BIC) @return: subjects
A count of subjects @param subject_types: the type of subject @param search: a search string @param raw: whether to return a raw result @return: a count of subjects
Returns works @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_types: the work types (e.g. [MONOGRAPH, TEXTBOOK]) @param work_status: (deprecated) the work status (e.g. ACTIVE) @param work_statuses: the work statuses (e.g. [ACTIVE]) @param updated_at_with_relations: timestamp and choice of greater/less than, for limiting results by last update time @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns a work by DOI @param doi: the DOI to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
Returns a work by ID @param work_id: the ID to fetch @param raw: whether to return a python object or the raw result @return: either an object (default) or raw server response
A count of works @param search: a search string @param publishers: a list of publishers by which to limit results @param work_types: the work types (e.g. [MONOGRAPH, TEXTBOOK]) @param work_status: (deprecated) the work status (e.g. ACTIVE) @param work_statuses: the work statuses (e.g. [ACTIVE]) @param updated_at_with_relations: timestamp and choice of greater/less than, for limiting results by last update time @param raw: whether to return a raw result @return: a count of works
Returns books @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_status: (deprecated) the work status (e.g. ACTIVE) @param work_statuses: the work statuses (e.g. [ACTIVE]) @param updated_at_with_relations: timestamp and choice of greater/less than, for limiting results by last update time @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
Returns books, in a minimal representation containing only workId @param limit: the maximum number of results to return @param order: a GraphQL order query statement @param offset: the offset from which to retrieve results @param publishers: a list of publishers to limit by @param search: a filter string to search @param work_status: (deprecated) the work status (e.g. ACTIVE) @param work_statuses: the work statuses (e.g. [ACTIVE]) @param updated_at_with_relations: timestamp and choice of greater/less than, for limiting results by last update time @param raw: whether to return a python object or the raw server result @return: either an object (default) or raw server response
A count of books @param search: a search string @param publishers: a list of publishers by which to limit results @param work_status: (deprecated) the work status (e.g. ACTIVE) @param work_statuses: the work statuses (e.g. [ACTIVE]) @param updated_at_with_relations: timestamp and choice of greater/less than, for limiting results by last update time @param raw: whether to return a raw result @return: a count of works
(c) ΔQ Programming LLP, November 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
A class to build a Thoth object structure
Creates an object structure from dictionary input @return: an object
(c) ΔQ Programming LLP, July 2021 This program is free software; you may redistribute and/or modify it under the terms of the Apache License v2.0.
Form for creating a new vocab word.
Form for creating a new standard.
Form for creating a new subject.
A standard to which a package can attest compliance
Returns the pk as a string
Returns:
- str
An attestation of compliance with a standard
Historical record of standard attestations being added or removed from packages.
A standardised vocabulary option for package banding. E.g. "Jisc Band 1"
Returns true if the banding is fte
Returns:
- bool
Returns a string for the m2m display
Returns:
- str
A subject vocabulary for categorizing packages.
Returns the pk as a string
Returns:
- str
Notify initiatives of new vocabs
Parameters:
-
banding_type: the banding type -
new_vocabs: the new vocabs -
request: the request
Returns:
- None
Notify initiatives of new standards
Parameters:
-
standard: the standard -
request: the request
Returns:
- None
List all the vocab items in the system
Parameters:
-
request: the request object
Returns:
- the response object
Delete a vocab item
Parameters:
-
request: the request object -
vocab_id: the id of the vocab item to delete
Returns:
- the response object
Create a new vocab item
Parameters:
-
request: the request object -
vocab_to_edit: the id of the vocab item to edit
Returns:
- the response object
List all the standards vocab items in the system
Parameters:
-
request: the request object
Returns:
- the response object
Create a new standard vocab item
Parameters:
-
request: the request object -
vocab_to_edit: the id of the vocab item to edit
Returns:
- the response object
Delete a standard vocab item
Parameters:
-
request: the request object -
vocab_id: the id of the vocab item to delete
Returns:
- the response object
List all the subjects in the system
Parameters:
-
request: the request object
Returns:
- the response object
Create or edit a subject
Parameters:
-
request: the request object -
subject_id: the id of the subject to edit
Returns:
- the response object