Members
- class fabman.member.Member(requester: Requester, attributes: dict)
Member object returned by the API. Provides access to all API calls that operate on a single member.
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- create_credit(**kwargs) MemberCredit
Creates a member credit
- Calls:
“POST /members/{id}/credits” <https://fabman.io/api/v1/documentation#/members/postMembersIdCredits>
- Returns:
fabman.member.MemberCreditobject with credit details- Return type:
- create_key(**kwargs) MemberKey
Creates a key for the member if one does not already exist. If member already has a key, use update_key().
- Calls:
“POST /members/{id}/key” <https://fabman.io/api/v1/documentation#/members/postMembersIdKey>
- Returns:
fabman.member.MemberKeyobject with key details- Return type:
- create_training(**kwargs) MemberTraining
Creates a Training object which links a member to a training course.
- Returns:
MemberTraining object
- Return type:
- delete(**kwargs) Response
Deletes a member
- Calls:
“DELETE /members/{id}” <https://fabman.io/api/v1/documentation#/members/deleteMembersId>
- Returns:
Response information of delete call
- Return type:
requests.Response
- get_balance_items(**kwargs) MemberBalanceItems
Retrieves the balance items of a member
- Calls:
“GET /members/{id}/balance-items” <https://fabman.io/api/v1/documentation#/members/getMembersIdBalanceitems>
- Returns:
Response information of get call
- Return type:
MemberBalanceItems
- get_changes(**kwargs) List[MemberChange]
Retrieves the changes of a member
- Calls:
“GET /members/{id}/changes” <https://fabman.io/api/v1/documentation#/members/getMembersIdChanges>
- Returns:
List of changes of a member
- Return type:
list[MemberChange]
- get_credit(credit_id: int, **kwargs) MemberCredit
Retrieves a credit of a member
- Calls:
“GET /members/{id}/credits/{creditId}” <https://fabman.io/api/v1/documentation#/members/getMembersIdCreditsCreditid>
- Parameters:
credit_id (int) – ID of the credit to retrieve
- Returns:
fabman.member.MemberCreditobject with credit details- Return type:
- get_credits(**kwargs) PaginatedList
Retrieves the credits of a member :calls: “GET /members/{id}/credits” <https://fabman.io/api/v1/documentation#/members/getMembersIdCredits>
- Returns:
List of credits of a member
- Return type:
- get_device(**kwargs) MemberDevice
Retrieves the device of a member used to authenticate on a bridge.
- Calls:
“GET /members/{id}/devices” <https://fabman.io/api/v1/documentation#/members/getMembersIdDevice>
- Returns:
Device information
- Return type:
dict
- get_device_change(change_id: int, **kwargs) MemberDeviceChange
Retrieves a device change of a member given the change ID
- Calls:
“GET /members/{id}/device/changes/{changeId}” <https://fabman.io/api/v1/documentation#/members/getMembersIdDeviceChangesChangeId>
- Parameters:
change_id (int) – ID of the change to retrieve
- Returns:
Device change information
- Return type:
dict
- get_device_changes(**kwargs) List[MemberDeviceChange]
Retrieves the device changes of a member
- Calls:
“GET /members/{id}/device/changes” <https://fabman.io/api/v1/documentation#/members/getMembersIdDeviceChanges>
- Returns:
List of device changes of a member
- Return type:
list[MemberDeviceChange]
- get_export(**kwargs) Response
Retrieves the export of a member. This is a placeholder for future functionality.
- Calls:
“GET /members/{id}/export” <https://fabman.io/api/v1/documentation#/members/getMembersIdExport>
- Raises:
NotImplementedError
- get_invitation(**kwargs) MemberInvitation
Retrieves the invitation status of a member
- Calls:
“GET /members/{id}/invitations” <https://fabman.io/api/v1/documentation#/members/getMembersIdInvitation>
- Returns:
Invitation status of a member
- Return type:
dict
- get_key(**kwargs) MemberKey
Retrieves the keycard number of a member
- Calls:
“GET /members/{id}/key” <https://fabman.io/api/v1/documentation#/members/getMembersIdKey>
- Returns:
fabman.member.MemberKeyobject with key details- Return type:
- get_package(member_package_id: int, **kwargs) MemberPackage
Retrieves a package of a member
- Calls:
“GET /members/{id}/packages/{memberPackageId}” <https://fabman.io/api/v1/documentation#/members/getMembersIdPackagesMemberpackageid>
- Parameters:
member_package_id (int) – ID of the package to retrieve
- Returns:
fabman.member.MemberPackageobject with package details- Return type:
- get_packages(**kwargs) EmbeddedList | PaginatedList
Retrieves the packages of a member
- Calls:
“GET /members/{id}/packages” <https://fabman.io/api/v1/documentation#/members/getMembersIdPackages>
- Returns:
List of packages of a member
- Return type:
- get_payment_account(**kwargs) MemberPaymentAccount
Retrieves the payment account of a member
- Calls:
“GET /members/{id}/payment-account” <https://fabman.io/api/v1/documentation#/members/getMembersIdPaymentaccount>
- Returns:
Payment account information
- Return type:
dict
- get_payment_method(**kwargs) MemberPaymentMethod
Retrieves the payment method of a member :calls: “GET /members/{id}/payment-method” <https://fabman.io/api/v1/documentation#/members/getMembersIdPaymentmethod>
- Returns:
Payment method information
- Return type:
dict
- get_payment_method_mandate_preview(**kwargs) MemberPaymentMethodMandatePreview
Retrieves the payment method mandate preview of a member
- Calls:
“GET /members/{id}/payment-method-mandate-preview” <https://fabman.io/api/v1/documentation#/members/getMembersIdPaymentmethodmandatepreview>
- Returns:
Payment method mandate preview information
- Return type:
dict
- get_privileges(**kwargs) MemberPrivileges
Retrieves the privileges of a member :calls: “GET /members/{id}/privileges” <https://fabman.io/api/v1/documentation#/members/getMembersIdPrivileges>
- Returns:
privileges of a member
- Return type:
dict
- get_trained_resources(**kwargs) MemberTrainedResources
Retrieves the trained resources of a member :calls: “GET /members/{id}/trained-resources” <https://fabman.io/api/v1/documentation#/members/getMembersIdTrainedResources>
- Returns:
Trained resources of a member
- Return type:
list
- get_training(training_id: int, **kwargs) MemberTraining
Retrieves a training of a member :calls: “GET /members/{id}/trainings/{trainingId}” <https://fabman.io/api/v1/documentation#/members/getMembersIdTrainingstrainingid>
- Parameters:
training_id (int) – ID of the training to retrieve
- Returns:
Training information
- Return type:
dict
- get_trainings(ignore_embeds: bool | None = False, **kwargs) PaginatedList | EmbeddedList
Retrieves the trainings of a member :calls: “GET /members/{id}/trainings” <https://fabman.io/api/v1/documentation#/members/getMembersIdTrainings>
- Returns:
List of trainings of a member
- Return type:
Union[PaginatedList, EmbeddedList]
- refresh() None
Updates the objects with more recent data from the API. Needs to be called when update() fails for lockVersioning.
- Calls:
“GET /members/{id}” <https://fabman.io/api/v1/documentation#/members/getMembersId>
- Returns:
None – updates attributes of the current object
- Return type:
None
- update(**kwargs) None
Updates the member object and sets the modified attributes based on what is returned by the server. Member object is updated in place.
- Calls:
“PUT /members/{id}” <https://fabman.io/api/v1/documentation#/members/putMembersId>
- Returns:
None – updates attributes of the current object
- Return type:
None
Member Balance Items
Member Changes
- class fabman.member.MemberChange(requester: Requester, attributes: dict)
Simple class to hold Member Changes
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- delete(**kwargs) Response
Deletes a member change given change ID
- Calls:
“DELETE /members/{id}/changes/{changeId}” <https://fabman.io/api/v1/documentation#/members/deleteMembersIdChangesChangeid>
- Returns:
Response information of delete call
- Return type:
requests.Response
Member Credit
- class fabman.member.MemberCredit(requester: Requester, attributes: dict)
Simple Class to handle operations on MemberCredits
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- delete(**kwargs) Response
Deletes a credit from a user account. WARNING: THIS CANNOT BE UNDONE.
- Calls:
“DELETE /members/{member_id}/credits/{credit_id}” <https://fabman.io/api/v1/documentation#/members/deleteMembersIdCreditsCreditid>
- Returns:
An empty dict if successful.
- Return type:
dict
- get_uses(**kwargs) List[MemberCreditUse]
Retrieves a list of uses of the credit.
- Calls:
“GET /members/{member_id}/credits/{credit_id}/uses” <https://fabman.io/api/v1/documentation#/members/getMembersIdCreditsCreditidUses>
- Returns:
A list of uses of the credit.
- Return type:
list
- update(**kwargs) None
Updates an existing credit in place
- Calls:
“PUT /members/{id}/credits/{creditId}” <https://fabman.io/api/v1/documentation#/members/putMembersIdCreditsCreditid>
- Returns:
None
- Return type:
None
Member Credit Use
- class fabman.member.MemberCreditUse(requester: Requester, attributes: dict)
Simple class to hold Credit Use
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
Member Device
- class fabman.member.MemberDevice(requester: Requester, attributes: dict)
Simple Class to represent a Member Device
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
Member Device Change
- class fabman.member.MemberDeviceChange(requester: Requester, attributes: dict)
Simple class to represent a Member Device Change
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- delete(**kwargs) Response
Deletes a member device change given change ID
- Calls:
“DELETE /members/{id}/device/changes/{changeId}” <https://fabman.io/api/v1/documentation#/members/deleteMembersIdDeviceChangesChangeid>
- Returns:
Response information of delete call
- Return type:
requests.Response
Member Invitation
- class fabman.member.MemberInvitation(requester: Requester, attributes: dict)
Simple class to represent a MemberInvitation
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
Member Key
- class fabman.member.MemberKey(requester: Requester, attributes: dict)
Manage a member keycard object
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- delete(**kwargs) Response
Deletes a member key. WARNING: THIS CANNOT BE UNDONE.
- Calls:
“DELETE /members/{self.member}/key” <https://fabman.io/api/v1/documentation#/members/deleteMembersIdKey>
- Returns:
Response information of delete call
- Return type:
requests.Response
- update(**kwargs) None
Updates a member key and updates the MemberKey object in place with new data from the API.
- Calls:
“PUT /member{self.member}/key” <https://fabman.io/api/v1/documentation#/members/putMembersIdKey>
- Returns:
None
- Return type:
None
Member Package
- class fabman.member.MemberPackage(requester: Requester, attributes: dict)
Simple class for managing member packages
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- delete(**kwargs) Response
Removes the package from the current user account. WARNING: THIS CANNOT BE UNDONE.
- Calls:
“DELETE /members/{id}/packages/{memberPackageId}” <https://fabman.io/api/v1/documentation#/members/deleteMembersIdPackagesMemberpackageid>
- Returns:
Response information of delete call
- Return type:
requests.Response
- get_package(**kwargs) Package
Gets information about the package
- Calls:
“GET /packages/{id}” <https://fabman.io/api/v1/documentation#/packages/getPackagesId>
- Returns:
fabman.package.Packageobject with Package details- Return type:
- update(**kwargs) None
Updates a member package and updates the MemberPackage object in place with new data from the API
- Calls:
“PUT /members/{id}/packages/{memberPackageId}” <https://fabman.io/api/v1/documentation#/members/putMembersIdPackagesMemberpackageid>
- Returns:
None
- Return type:
None
Member Payment Account
- class fabman.member.MemberPaymentAccount(requester: Requester, attributes: dict)
Simple object to hold Member Payment Accounts
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
Member Payment Method
- class fabman.member.MemberPaymentMethod(requester: Requester, attributes: dict)
Simple object to hold Member Payment Methods
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- delete(**kwargs)
Deletes a member payment method
- Calls:
“DELETE /members/{id}/payment-method” <https://fabman.io/api/v1/documentation#/members/deleteMembersIdPaymentmethod>
- Returns:
Response information of the delete call
- Return type:
requests.Response
Member Payment Method Mandate Preview
- class fabman.member.MemberPaymentMethodMandatePreview(requester: Requester, attributes: dict)
Simple object to hold Member Payment Method Mandate Previews
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
Member Privileges
- class fabman.member.MemberPrivileges(requester: Requester, attributes: dict)
Simple object to hold Member Privileges
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
Member Trained Resource
MemberTraining
- class fabman.member.MemberTraining(requester: Requester, attributes: dict)
Simple object to handle Member Trainings
Initialize the Object. Stores the requester method to interact with the API for further calls
- Parameters:
requester (
Requester) – TheRequesterobject to make requests withattributes (dict) – The attributes to initialize this object with
- delete(**kwargs)
Deletes a member training
- Calls:
“DELETE /members/{id}/trainings/{trainingId}” <https://fabman.io/api/v1/documentation#/members/deleteMembersIdTrainingsTrainingid>
- Returns:
Response Information of delete call
- Return type:
requests.Response