# `@rocketmakers/template-http-repository`

## Repository classes needed to interact with a git(lab/hub) repository containing notification templates

We have setup an [example repo](https://gitlab.com/rocketmakers/spike-template-source) to serve as a demonstration and for testing purposes.

### Implementation

When using `@rocketmakers/template-http-repository` there are two options to register service classes with your ioc framework.

Option #1:

If you only want to register individual classes as needed, you can bootstrap repositories as you would with any other class.

Option #2:

You can bootstrap template http repository classes using the exposed `registerTemplateRepositoryIoC()` function by following the steps below.

```typescript
// Register types and repository classes from @rocketmakers/-template-http-repository
registerTemplateRepositoryIoC({ rootUrl, serviceName });
```

_N.B. the format for the provided `rootUrl` should be `https://<remote-repo-provider>.com/<organisation>/<project>/raw/<branch-name>`. For example: `https://gitlab.com/rocketmakers/spike-template-source/-/raw/master`_

### Docs

Hosted docs covering types, interfaces and all repository class/method signatures within this package can be found using the link below:

[Documentation](https://docs.rocketmakers.com/templates/node)

### Source code

Source code for this package can be found using the link below:

[Source code](https://gitlab.com/rocketmakers/core/templates/node/template-http-repository)

Contributing docs can be found in the [README.md](https://gitlab.com/rocketmakers/core/templates#readme)
