1.0.16 ā€¢ Published 3 years ago

@raniel/airtable v1.0.16

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Welcome to @raniel/airtable šŸ‘‹

Version Documentation Maintenance License: MIT Publish on npm

Simple Airtable service for Angular applications.

Install in your Angular app

npm i @raniel/airtable

Setup

Add the HttpClientModule to imports array in your app.module.ts, using the following import:

import {HttpClientModule} from '@angular/common/http';

Injects the AirtableService in a constructor like this:

constructor(private airtable: AirtableService) {}

Set your api key and database id to airtable service variables:

this.airtable.apiKey = 'YOUR_AIRTABLE_API_KEY';
this.airtable.dbId = 'YOUR_AIRTABLE_DATABASE_ID';

Usage

// get all rows from your table
this.airtable.getList('your_table_name').subscribe(response => {  
    console.log(response);  
});

// get a table row from a field value
this.airtable.getListByFieldValue('your_table_name', 'field_name', 'field_value').subscribe(response => {  
    console.log(response);  
});

// get a table row from its id
this.airtable.getRecord('your_table_name', 'recN1pdRLKOt5R0rs').subscribe(response => {  
    console.log(response);  
});

// delete rows given their id
this.airtable.doDelete('your_table_name', ['recMPsjsJGUOsz3gz', 'rec5UKOJL1jkAlPBB', 'recRjKYjaBvtDS4UW']).subscribe(response => {  
    console.log(response);  
});

// insert a row in your table
this.airtable.doInsert('your_table_name', {  
    field1: 'field1 value',  
    field2: 'field2 value',
    ...
    fieldN: 'fieldN value'
}).subscribe(response => {  
    console.log(response);  
});

// alter the values of a row given its id
this.airtable.doUpdate('your_table_name', 'recN1pdRLKOt5R0rs', {  
    fieldName: 'new field value',  
}).subscribe(response => {  
    console.log(response);  
});

// clear the table (be careful!)
this.airtable.doTruncate('your_table_name');

Author

šŸ‘¤ Daniele Sabre (https://github.com/raniel86)

šŸ¤ Contributing

Contributions, issues and feature requests are welcome!

Feel free to check issues page.

Show your support

Give a ā­ļø if this project helped you!

šŸ“ License

Copyright Ā© 2020 Daniele Sabre (https://github.com/raniel86).

This project is MIT licensed.


This README was generated with ā¤ļø by readme-md-generator

1.0.16

3 years ago

1.0.15

3 years ago

1.0.14

3 years ago

1.0.13

3 years ago

1.0.10

3 years ago

1.0.12

3 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago