Skip to content

dv4mp1r3/spacebot

Repository files navigation

Requirements.

Python 3.10.x or 3.11.x with pip for host or docker

Installation & Usage

git clone https://github.com/dv4mp1r3/spacebot.git
cd spacebot
cp .env.example .env

Getting Started (docker)

Make sure you have Google service account inside project directory named service-account.json. This file needs to access to document with accounting info from GOOGLE_SHEET_URL env.

First of all, edit files .env and residents.csv (fill in the correct data).

Then build and run docker container: docker build -t your/tag:1.0 . && docker run your/tag:1.0

openapi-client

B4CKSP4CE member/money management system

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0
  • Package version: 1.0.0
  • Generator version: 7.14.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.9+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import openapi_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import openapi_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import os
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
    host = "http://localhost"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]

# Uncomment below to set up prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'

# Configure Bearer authorization (JWT): bearerAuth
configuration = openapi_client.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)


# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = openapi_client.AcsKeysApi(api_client)
    create_acs_key_dto = openapi_client.CreateACSKeyDTO() # CreateACSKeyDTO | 

    try:
        # Create ACS key
        api_response = api_instance.a_cs_keys_controller_create(create_acs_key_dto)
        print("The response of AcsKeysApi->a_cs_keys_controller_create:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AcsKeysApi->a_cs_keys_controller_create: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AcsKeysApi a_cs_keys_controller_create POST /api/acs-keys Create ACS key
AcsKeysApi a_cs_keys_controller_find_all_by_member_id GET /api/acs-keys/member/{memberId} Get ACS keys for specific member
AcsKeysApi a_cs_keys_controller_remove DELETE /api/acs-keys/{id} Delete ACS key
ApiKeysApi api_keys_controller_create POST /api/api-keys Create new API key
ApiKeysApi api_keys_controller_find_my GET /api/api-keys Get your API keys
ApiKeysApi api_keys_controller_remove DELETE /api/api-keys/{id} Delete API key
AuthApi auth_controller_get_self GET /api/auth/self Get self member auth info
DefaultApi status_controller_health GET /api/health
MacsApi m_acs_controller_create POST /api/macs Create new MAC
MacsApi m_acs_controller_find_by_member_id GET /api/macs/member/{memberId} Get MACs for specific member
MacsApi m_acs_controller_remove DELETE /api/macs/{id} Delete MAC
MemberTransactionsApi member_transactions_controller_create POST /api/member-transactions Create new member transaction
MemberTransactionsApi member_transactions_controller_find_all GET /api/member-transactions Get all member transactions
MemberTransactionsApi member_transactions_controller_find_all_by_actor_member GET /api/member-transactions/actor/{memberId} Get all member transactions for actor member
MemberTransactionsApi member_transactions_controller_find_all_by_subject_member GET /api/member-transactions/subject/{memberId} Get all member transactions for subject member
MembersApi members_controller_create POST /api/members Create new member
MembersApi members_controller_delete_git_hub_metadata DELETE /api/members/{id}/github Delete GitHub metadata for member
MembersApi members_controller_delete_telegram_metadata DELETE /api/members/{id}/telegram Delete Telegram metadata for member
MembersApi members_controller_find_all GET /api/members Get info about all members
MembersApi members_controller_find_by_id GET /api/members/{id} Get full info about member
MembersApi members_controller_stats GET /api/members/stats Get stats of all members
MembersApi members_controller_update PATCH /api/members/{id} Update member
MembersApi members_controller_update_git_hub_metadata PATCH /api/members/{id}/github Add/update GitHub metadata for member
MembersApi members_controller_update_status PATCH /api/members/{id}/status Freeze/unfreeze member
MembersApi members_controller_update_telegram_metadata PATCH /api/members/{id}/telegram Add/update Telegram metadata for member
MembershipSubscriptionsApi membership_subscriptions_controller_find_all_by_member_id GET /api/membership-subscriptions/member/{memberId} Get all membership subscriptions for member
MembershipSubscriptionsApi membership_subscriptions_controller_find_all_by_membership_id GET /api/membership-subscriptions/membership/{membershipId} Get all membership subscriptions for membership
MembershipSubscriptionsApi membership_subscriptions_controller_stats GET /api/membership-subscriptions/stats Get all membership subscriptions statistics
MembershipSubscriptionsApi membership_subscriptions_controller_subscribe POST /api/membership-subscriptions Subscribe member to membership
MembershipSubscriptionsApi membership_subscriptions_controller_unsubscribe DELETE /api/membership-subscriptions/{id} Unsubscribe member from membership
MembershipsApi memberships_controller_create POST /api/memberships Create new membership
MembershipsApi memberships_controller_find_all GET /api/memberships Get all memberships
MembershipsApi memberships_controller_update_membership PATCH /api/memberships/{id} Update membership
SpaceApi space_controller_get_balance GET /api/space/balance Get space balance
SpaceTransactionsApi space_transactions_controller_create POST /api/space-transactions Create new space transaction
SpaceTransactionsApi space_transactions_controller_find_all GET /api/space-transactions Get all space transactions
SpaceTransactionsApi space_transactions_controller_find_all_by_actor GET /api/space-transactions/actor/{memberId} Get all space transactions

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

cookie

  • Type: API key
  • API key parameter name: session
  • Location:

bearerAuth

  • Type: Bearer authentication (JWT)

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors