Skip to content

Commit

Permalink
Converts export to not use default. Exports model classes from entryp…
Browse files Browse the repository at this point in the history
…oint. Updates existing documentation
  • Loading branch information
coconutcraig committed Jan 14, 2019
1 parent 60a0618 commit 6cf45fd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ Set the limit which you want returned.
##### Example

```javascript
import OpenApi from 'coconut-open-api-js';
import { OpenApi } from 'coconut-open-api-js';

class Locations {
constructor() {
Expand Down Expand Up @@ -158,7 +158,7 @@ Set the limit which you want returned.
##### Example

```javascript
import OpenApi from 'coconut-open-api-js';
import { OpenApi } from 'coconut-open-api-js';

class Questions {
constructor() {
Expand Down Expand Up @@ -220,7 +220,7 @@ Set the limit which you want returned.
##### Example

```javascript
import OpenApi from 'coconut-open-api-js';
import { OpenApi } from 'coconut-open-api-js';

class Services {
constructor() {
Expand Down Expand Up @@ -254,7 +254,7 @@ Send the API request.
##### Example

```javascript
import OpenApi from 'coconut-open-api-js';
import { OpenApi } from 'coconut-open-api-js';

class Settings {
constructor() {
Expand Down Expand Up @@ -294,7 +294,7 @@ Send the API request using the pre-set filters.
##### Example

```javascript
import OpenApi from 'coconut-open-api-js';
import { OpenApi } from 'coconut-open-api-js';

class TimeSlots {
constructor() {
Expand Down Expand Up @@ -348,7 +348,7 @@ Set the limit which you want returned.
##### Example

```javascript
import OpenApi from 'coconut-open-api-js';
import { OpenApi } from 'coconut-open-api-js';

class Users {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import OpenApi from './index';
import { OpenApi } from './index';
import Appointment from './resources/appointment';
import Location from './resources/location';
import Question from './resources/question';
Expand Down
7 changes: 6 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { AxiosInstance } from 'axios';

import Client from './client';
import Answer from './models/Answer';
import Attendee from './models/attendee';
import Preference from './models/preference';
import Appointment, { AppointmentResource } from './resources/appointment';
import Location, { LocationResource } from './resources/location';
import Question, { QuestionResource } from './resources/question';
Expand Down Expand Up @@ -39,7 +42,9 @@ export interface Sortable extends Resource {
sortBy(sortable: string): this;
}

export default class OpenApi {
export { Answer, Attendee, Preference };

export class OpenApi {
protected appointment: AppointmentResource;
protected client: AxiosInstance;
protected domain: string;
Expand Down

0 comments on commit 6cf45fd

Please sign in to comment.