# EDropinAccounts.EaFilesApi

All URIs are relative to *https://edropin-test.appspot.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**createFile**](EaFilesApi.md#createFile) | **POST** /files | Create a file
[**createImage**](EaFilesApi.md#createImage) | **POST** /files/image | Create an image file
[**createUnsplashImage**](EaFilesApi.md#createUnsplashImage) | **POST** /files/unsplash-image | Create an unsplash image file
[**deleteFile**](EaFilesApi.md#deleteFile) | **DELETE** /files/{fileId} | Delete a file
[**listFiles**](EaFilesApi.md#listFiles) | **GET** /files | List of files
[**retrieveFile**](EaFilesApi.md#retrieveFile) | **GET** /files/{fileId} | Retrieve a file


<a name="createFile"></a>
# **createFile**
> EaFile createFile(body)

Create a file

### Example
```javascript
var EDropinAccounts = require('e_dropin_accounts');
var defaultClient = EDropinAccounts.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

// Configure API key authorization: ClientKey
var ClientKey = defaultClient.authentications['ClientKey'];
ClientKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ClientKey.apiKeyPrefix = 'Token';

var apiInstance = new EDropinAccounts.EaFilesApi();

var body = new EDropinAccounts.EaFileUpdate(); // EaFileUpdate | File Info


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createFile(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**EaFileUpdate**](EaFileUpdate.md)| File Info | 

### Return type

[**EaFile**](EaFile.md)

### Authorization

[Authorization](../README.md#Authorization), [ClientKey](../README.md#ClientKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="createImage"></a>
# **createImage**
> EaFile createImage(body)

Create an image file

### Example
```javascript
var EDropinAccounts = require('e_dropin_accounts');
var defaultClient = EDropinAccounts.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

// Configure API key authorization: ClientKey
var ClientKey = defaultClient.authentications['ClientKey'];
ClientKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ClientKey.apiKeyPrefix = 'Token';

var apiInstance = new EDropinAccounts.EaFilesApi();

var body = new EDropinAccounts.EaFileUpload(); // EaFileUpload | File Info


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createImage(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**EaFileUpload**](EaFileUpload.md)| File Info | 

### Return type

[**EaFile**](EaFile.md)

### Authorization

[Authorization](../README.md#Authorization), [ClientKey](../README.md#ClientKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="createUnsplashImage"></a>
# **createUnsplashImage**
> EaFile createUnsplashImage(body)

Create an unsplash image file

### Example
```javascript
var EDropinAccounts = require('e_dropin_accounts');
var defaultClient = EDropinAccounts.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

// Configure API key authorization: ClientKey
var ClientKey = defaultClient.authentications['ClientKey'];
ClientKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ClientKey.apiKeyPrefix = 'Token';

var apiInstance = new EDropinAccounts.EaFilesApi();

var body = new EDropinAccounts.EaUnsplashPhoto(); // EaUnsplashPhoto | File Info


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createUnsplashImage(body, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **body** | [**EaUnsplashPhoto**](EaUnsplashPhoto.md)| File Info | 

### Return type

[**EaFile**](EaFile.md)

### Authorization

[Authorization](../README.md#Authorization), [ClientKey](../README.md#ClientKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="deleteFile"></a>
# **deleteFile**
> EaFile deleteFile(fileId)

Delete a file

### Example
```javascript
var EDropinAccounts = require('e_dropin_accounts');
var defaultClient = EDropinAccounts.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

// Configure API key authorization: ClientKey
var ClientKey = defaultClient.authentications['ClientKey'];
ClientKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ClientKey.apiKeyPrefix = 'Token';

var apiInstance = new EDropinAccounts.EaFilesApi();

var fileId = "fileId_example"; // String | File Id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteFile(fileId, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fileId** | **String**| File Id | 

### Return type

[**EaFile**](EaFile.md)

### Authorization

[Authorization](../README.md#Authorization), [ClientKey](../README.md#ClientKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="listFiles"></a>
# **listFiles**
> EaPagedFile listFiles(opts)

List of files

### Example
```javascript
var EDropinAccounts = require('e_dropin_accounts');
var defaultClient = EDropinAccounts.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

// Configure API key authorization: ClientKey
var ClientKey = defaultClient.authentications['ClientKey'];
ClientKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ClientKey.apiKeyPrefix = 'Token';

var apiInstance = new EDropinAccounts.EaFilesApi();

var opts = { 
  'cursor': "cursor_example", // String | Start Cursor for query
  'limit': 20 // Number | Number of items returned
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listFiles(opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **cursor** | **String**| Start Cursor for query | [optional] 
 **limit** | **Number**| Number of items returned | [optional] [default to 20]

### Return type

[**EaPagedFile**](EaPagedFile.md)

### Authorization

[Authorization](../README.md#Authorization), [ClientKey](../README.md#ClientKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

<a name="retrieveFile"></a>
# **retrieveFile**
> EaFile retrieveFile(fileId)

Retrieve a file

### Example
```javascript
var EDropinAccounts = require('e_dropin_accounts');
var defaultClient = EDropinAccounts.ApiClient.instance;

// Configure API key authorization: Authorization
var Authorization = defaultClient.authentications['Authorization'];
Authorization.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Authorization.apiKeyPrefix = 'Token';

// Configure API key authorization: ClientKey
var ClientKey = defaultClient.authentications['ClientKey'];
ClientKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ClientKey.apiKeyPrefix = 'Token';

var apiInstance = new EDropinAccounts.EaFilesApi();

var fileId = "fileId_example"; // String | File Id


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.retrieveFile(fileId, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **fileId** | **String**| File Id | 

### Return type

[**EaFile**](EaFile.md)

### Authorization

[Authorization](../README.md#Authorization), [ClientKey](../README.md#ClientKey)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json

