<commit_before># CloudOS.ManagerAPI

This repository contains an Elixir API library for the CloudOS Manager.

## Usage
Add the following to your mix.exs dependencies:

```elixir
defp deps do
  [
    {:cloudos_manager_api, "~> 0.0.1"},
  ]
end
```

This API library can be consumed either as an application (which can be supervised), or on a per-instance basis. 

### Usage:  As an Application
To use an application, add  the :cloudos_manager_api to your mix file, and specify the following configuration:

```elixir
# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
  [
    mod: {MyApp, []},
    applications: [:cloudos_manager_api]
  ]
end
```

* URL
  * Type: String
  * Description: The url of the CloudOS Manager
  * Environment Configuration (.exs): :cloudos_manager_api, :manager_url
* Client ID
  * Type: String
  * Description: The OAuth2 client id to be used for authenticating with the CloudOS Manager
  * Environment Configuration (.exs): :cloudos_manager_api, :oauth_client_id
* Client Secret
  * Type: String
  * Description: The OAuth2 client secret to be used for authenticating with the CloudOS Manager
  * Environment Configuration (.exs): :cloudos_manager_api, :oauth_client_secret

When using as an application, you do not need to create or specify the API Agent (it will be populated for you).

### Usage:  On a Per-Instance Basis
To use on a per-instance basis, simply create an ManagerAPI process and pass it to the API modules. 

```iex
    api = CloudOS.ManagerAPI.create!(%{manager_url: "https://cloudos-mgr.host.co", oauth_login_url: "https://auth.host.co", oauth_client_id: "id", oauth_client_secret: "secret"})

```<commit_msg>Updated Readme for oauth login url<commit_after># CloudOS.ManagerAPI

This repository contains an Elixir API library for the CloudOS Manager.

## Usage
Add the following to your mix.exs dependencies:

```elixir
defp deps do
  [
    {:cloudos_manager_api, "~> 0.0.1"},
  ]
end
```

This API library can be consumed either as an application (which can be supervised), or on a per-instance basis. 

### Usage:  As an Application
To use an application, add  the :cloudos_manager_api to your mix file, and specify the following configuration:

```elixir
# Configuration for the OTP application
#
# Type `mix help compile.app` for more information
def application do
  [
    mod: {MyApp, []},
    applications: [:cloudos_manager_api]
  ]
end
```

* Manager URL
  * Type: String
  * Description: The url of the CloudOS Manager
  * Environment Configuration (.exs): :cloudos_manager_api, :manager_url
* OAuth Login URL
  * Type: String
  * Description: The login url of the OAuth2 server
  * Environment Configuration (.exs): :cloudos_manager_api, :oauth_login_url
* OAuth Client ID
  * Type: String
  * Description: The OAuth2 client id to be used for authenticating with the CloudOS Manager
  * Environment Configuration (.exs): :cloudos_manager_api, :oauth_client_id
* OAuth Client Secret
  * Type: String
  * Description: The OAuth2 client secret to be used for authenticating with the CloudOS Manager
  * Environment Configuration (.exs): :cloudos_manager_api, :oauth_client_secret

When using as an application, you do not need to create or specify the API Agent (it will be populated for you).

### Usage:  On a Per-Instance Basis
To use on a per-instance basis, simply create an ManagerAPI process and pass it to the API modules. 

```iex
    api = CloudOS.ManagerAPI.create!(%{manager_url: "https://cloudos-mgr.host.co", oauth_login_url: "https://auth.host.co", oauth_client_id: "id", oauth_client_secret: "secret"})

```
{'fraction_non_alphanumeric': 0.09095905468535312, 'fraction_numerical': 0.003022808463863699, 'mean_word_length': 4.449101796407185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4381616', 'n_tokens_mistral': 1120, 'n_tokens_neox': 1084, 'n_words': 434}