# Class JContentFactory

#### Hierarchy (View Summary)

- JBaseApi
  - JContentFactory

- Defined in jamespot-user-api/src/apis/contentFactory/contentFactory.ts:6

##### Index

### Constructors

constructor

### Properties

jApi
network

### Methods

create
exportTemplateUrl
get
importTemplate

## Constructors

### constructor

- new JContentFactory(jApi: JamespotUserApi): JContentFactory

  #### Parameters

  - jApi: JamespotUserApi

  #### Returns JContentFactory

  Inherited from JBaseApi.constructor

  - Defined in jamespot-user-api/src/apis/base.ts:8

## Properties

### jApi

jApi: JamespotUserApi

Inherited from JBaseApi.jApi

- Defined in jamespot-user-api/src/apis/base.ts:5

### network

network: Network

Inherited from JBaseApi.network

- Defined in jamespot-user-api/src/apis/base.ts:6

## Methods

### create

- create(
  params: { uri: string },
  ): Promise<ApiWrapper<jContentFactoryTemplateView, BaseMessages>>

  #### Parameters

  - params: { uri: string }

  #### Returns Promise<ApiWrapper<jContentFactoryTemplateView, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/contentFactory/contentFactory.ts:7

### exportTemplateUrl

- exportTemplateUrl(id: number): string

  URL de l'Action d'export (téléchargement .json) d'un modèle — à poser en href d'un lien.

  #### Parameters

  - id: number

  #### Returns string

  - Defined in jamespot-user-api/src/apis/contentFactory/contentFactory.ts:21

### get

- get(
  params: { uri: string },
  ): Promise<ApiWrapper<jContentFactoryTemplateView, BaseMessages>>

  #### Parameters

  - params: { uri: string }

  #### Returns Promise<ApiWrapper<jContentFactoryTemplateView, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/contentFactory/contentFactory.ts:11

### importTemplate

- importTemplate(
  params: { payload: ContentFactoryTemplateFile },
  ): Promise<ApiWrapper<jContentFactoryTemplateView, BaseMessages>>

  Importe un modèle depuis le contenu (parsé) d'un fichier .json (validé côté serveur).

  #### Parameters

  - params: { payload: ContentFactoryTemplateFile }

  #### Returns Promise<ApiWrapper<jContentFactoryTemplateView, BaseMessages>>

  - Defined in jamespot-user-api/src/apis/contentFactory/contentFactory.ts:16