Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

F2 API client

API client for The cBrain F2 Platform.

See the F2 REST API documentation for details.

Installation

composer require itk-dev/f2-api-client

Usage

See F2ApiClientCommand for an example usage.

Testing

Edit .env.local and set these variables:

# .env.local
F2_API_URI=
F2_API_USERNAME=
F2_API_SECRET=
F2_F2_USERNAME=

F2_API_TIME_ZONE=

Run

docker compose run --quiet --rm phpfpm composer install
docker compose run --quiet --rm phpfpm php bin/f2-api-client getServiceIndex

to check that you can talk to the F2 API.

Note

We'll use task f2-api-client:run (cf. Taskfile.yml) as a shorthand for running docker compose run --quiet --rm phpfpm php bin/f2-api-client (cf. Development).

Use task f2-api-client:debug to debug with Xdebug.

Search cases with

task f2-api-client:run -- caseSearch test

See case details:

task f2-api-client:run -- caseById 2204

Development

For development (and testing) a couple of useful tasks are defined:

* f2-api-client:run:         Run bin/f2-api-client inside docker compose setup, e.g. `task f2-api-client:run -- caseSearch 'test'`
* f2-api-client:debug:       Debug bin/f2-api-client inside docker compose setup, e.g. `task f2-api-client:debug -- caseSearch 'test'`

F2 REST documentation

The F2 REST documentation is available only as a PDF (!), but we need something we can refer to. Therefore, we convert the PDF to HTML and serve that.

Run

task f2-rest-docs:serve

and open http://127.0.0.1:8787/.


---
title: F2 Conceptual model
---
%% https://mermaid.ai/open-source/syntax/classDiagram.html
classDiagram
    Document --> Matter
    Matter --> CaseFile
    Party
    Note --> CaseFile: (only if not related to Matter)
    Note --> Matter: (only if not related to CaseFile)

    Chat --> Matter

    %% class Item{
    %%     +String title
    %% }
    %%
    %% Item <|-- Document
    %% Item <|-- Matter
    %% Item <|-- CaseFile
Loading

F2 REST API, p. 4


The client MUST read the service index at runtime and use it to locate the links it needs.

F2 REST API, p. 8

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages