Download the PHP package 5pm-hdh/churchtools-api without Composer
On this page you can find all versions of the php package 5pm-hdh/churchtools-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package churchtools-api
ChurchTools-API Client
The ChurchTools-API Client is a PHP-based wrapper for the ChurchTools API and has been tested with ChurchTools
version
[!NOTE] Version 2 has been launched, featuring a restructured code base and numerous new features. If you're upgrading from version 1 to 2, please consult the Upgrade Guide.
Installation
Go to the project-root and install ChurchTools-API via composer:
Load all dependency packages into the PHP project using the following code:
Usage
Before you can start to request data from the API you need to configure the CT-Client (ChurchTools client) with
the CTConfig
-interface:
For more information visit the CTConfig documentation From now on all features of the ChurchTools-API are available.
Requests and Models
The whole ChurchTools-API client is build on top of the Requests and Models. Requests provide an interface to specify your api call by adding filtering, pagination and sorting. Models represent the data, that the Requests retrieve. More informations can be found in the documentation:
- Requests
- Models
All APIs with examples:
- Person-API
- Group-API
- Calendar-API
- Resource- and Bookings-API
- PublicGroup-API
- Event-API
- Song-API
- Service-API
- Absence-API
- Wiki-API
- Permission-API
- File-API
- Search-API
- DB-Fields
- Tags-API
The following brief examples demonstrate the capabilities of the ChurchTools-API client and provide a general overview of its potential uses:
Example: Person-API
Example: Event-API
Example: Wiki-API
Result:
Support / Contribute
We welcome your support and contributions to this project.
CTLog - Logging Request
The CTLog provides a facade to log Informations. By default it logs all important infos, warnings and errors in the
log-file: churchtools-api.log
. The creation of a logfile can be enabled and disabled with the method:
By default, the console will display all logs of Error, Critical, Alert, and Emergency levels. If you wish to display additional log levels on the console, you may use the CTConfig-Debug option or set it directly in the CTLog facade:
To log a message, use the getLog-method:
Further information on CTLog-Page:
Error-Handling
The API-Wrapper provides custom exceptions. More on this page: Error-Handling
Unit- and Integration-Tests
To access the unit tests, navigate to the "tests/unit" directory. You may use the standard PHPUnit\Framework\TestCase to test small sections of code, or use TestCaseHttpMocked to simulate an HTTP request.
For integration tests, requests are sent directly to a ChurchTools instance. The "integration-test-data.json" file contains all available test data scenarios. All integration tests are automatically executed via Github Actions.
Doc-Generator
The Doc-Generator parses all documentation files and runs the PHP code examples to verify their validity. For additional information, please refer to this page: Doc-Generator
License
This project is licensed under MIT-License feel free to use it or to contribute.
Showcase:
To provide you with an idea of the ChurchTools-API Client's potential uses, here are a few examples. If you're working on a project too, please consider contributing and adding it to this list:
Administration Tools:
- ChurchTools-CLI by @5pm-HDH: With the ChurchTools-CLI-Tool, you can access data from your ChurchTools application instance directly through a CLI application, using simple commands that are easy to learn. The tool is compatible with cmd on Windows, terminal on Mac, and bash on Linux.
- ChurchTools GroupMeetings by @a-schild: Create ical feed from group meetings
- ChurchTools PDF Calendar by @a-schild: Generate PDF month calendars from churchtools
- ECGPB Member List Administration by @stollr: This application is written for the christian church Evangeliums-Christengemeinde e.V. and its main purpose is the administration of its members and to generate a printable member list.
Wordpress Plugins:
- ChurchTools WP Calendarsync by @a-schild: This wordpress plugin does take the events from the churchtools calendar and imports them as events in wordpress.
- Wordpress Plugin für ChurchTools Anmeldungen by @5pm-HDH: Mit diesem Wordpress-Plugin kannst du das von ChurchTools zur Verfügung gestellte iFrame für die Anmeldungen ersetzen durch einen eigenen Template-basierten Ansatz.
Other Applications:
- FreeScout Module by @churcholution: Login to FreeScout with ChurchTools credentials and manage permissions based on group/role memberships.
All versions of churchtools-api with dependencies
php Version >=8.1
monolog/monolog Version ^3
doctrine/cache Version ^1.11