Git Product home page Git Product logo

churchtoolsapi's Introduction

Setup

Using project source code directly

Downloading the source code of the project by default a config.py needs to be added in the "secure" folder for default execution. Please be aware that this will include sensitive information and should never be shared with 3rd parties and is therefore included in gitignore

It should look like this:

# COMMENT FOR WHICH USER / DATE this is -> DO NOT SHARE
ct_domain = 'https://YOUR-DOMAIN.DE'
ct_token = 'TOKEN SECRET VERY LONG RANDOM STRING'
ct_users = {'USER_EMAIL': 'USER_PASSWORD'}

Using it as a module

If you want to use this code as a python module certain classes will require params similar to the config file in order to access your system

  • check the docstrings for correct usage

The latest release can be found on https://github.com/bensteUEM/ChurchToolsAPI/releases

It can be installed using pip install git+https://github.com/bensteUEM/[email protected]#egg=ChurchToolsAPI' replacing X.X.X by a released version number

CT Token

CT_TOKEN can be obtained / changed using the "Berechtigungen" option of the user which should be used to access the CT instance. It is highly recommended to setup a custom user with minimal permissions for use with this module. However please check the log files and expect incomplete results if the user is msising permissions.

Development use

The script was coded using PyCharm Community edition. Test cases are automatically run when pushed to GitHub. This ensures that basic functionality is checked against at least one environment.

Please be aware that some of the test cases require specific IDs to be present on the CT server which is tested against. The respective function do have a hint like the one below in the docstring of the respective functions

IMPORTANT - This test method and the parameters used depend on the target system!

You are more than welcome to contribute additional code using respective feature branches and pull requests.

Compatibility

Tested against the current Churchtools APIs as of March 2023. More information is provided on the respective ChurchTools pages.

REST API

https://YOUR_DOMAIN/api/

More recent and should be used for anything that is accessible through this API. Documentation of additional endpoints can be found opening the respective URL. The API was developed to support the ChurchTools Web App and does not yet include th full feature set of CT Web

Legacy API

https://api.church.tools/index.html

Legacy API used by the WebUI which includes some endpoints that were not yet implemented into the REST API. Some functions can be reverse engineered using Web-Developer Console to monitor requests. The API is subject to change and might stop working with any future release!

It is also more time consuming than the REST api as it often queries large sets of data instead of specific items.

License

This code is provided with a CC-BY-SA license See https://creativecommons.org/licenses/by-sa/2.0/ for details.

In short this means - feel free to do anything with it BUT you are required to publish any changes or additional functionality (even if you intended to add functionality for yourself only!)

Anybody using this code is more than welcome to contribute with change requests to the original repository.

Contributors

churchtoolsapi's People

Contributors

bensteuem avatar dependabot[bot] avatar kolibri52 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.