Blog post: https://medium.com/@benoror/creating-an-ember-addon-for-airtable-api-d9e38d7bef97#.33q0r7hhm
Node Proxy (Optional): https://github.com/benoror/airtable-api-proxy
Airtable |
Ember addon for Airtable APIs
Dummy app: https://github.com/benoror/ember-airtable/tree/master/tests/dummy/app
*Originally based on: https://github.com/benoror/fieldbook-app
ember install ember-airtable
Use AirtableAdapter as you application's main adapter:
adapters/application.js
:import AirtableAdapter from "ember-airtable/adapter";
export default AirtableAdapter.extend({
// API Version + Base ID
namespace: 'v0/app_YOUR_AIRTABLE_BASE_KEY',
headers: {
'Accept': 'application/json',
// API Token
'Authorization': `Bearer key_YOUR_AIRTABLE_API_KEY`
}
});
Use AirtableSerializer as you application's main serializer:
serializers/application.js
:import AirtableSerializer from "ember-airtable/serializer";
export default AirtableSerializer.extend();
If you want to skip persistance of certain attributes (ex. formula columns) add the readOnly
option:
models/product.js
:import DS from 'ember-data';
export default DS.Model.extend({
formula: DS.attr('string', { readOnly: true })
});
You can use all of the API features when querying Airtable:
routes/products.js
:import Ember from 'ember';
export default Ember.Route.extend({
model() {
return this.store.query('product', {
// Only data for fields whose names are in this list will be included in the records.
fields: ['name', 'description'],
// A formula used to filter records.
filterByFormula: "NOT({name} = 'MacBook')",
// The maximum total number of records that will be returned.
maxRecords: 50,
// The number of records returned in each request.
pageSize: 10,
// A list of sort objects that specifies how the records will be ordered.
sort: [{field: "name", direction: "desc"}],
// The name or ID of a view in the table.
view: 'active_products'
});
}
});
git clone
this repositorynpm install
bower install
ember server
npm test
(Runs ember try:testall
to test your addon against multiple Ember versions)ember test
ember test --server
ember build
For more information on using ember-cli, visit http://ember-cli.com/.
Ember检查器是一个浏览器插件,用于调试Ember应用程序。 灰烬检查员包括以下主题 - S.No. 灰烬检查员方式和描述 1 安装Inspector 您可以安装Ember检查器来调试您的应用程序。 2 Object Inspector Ember检查器允许与Ember对象进行交互。 3 The View Tree 视图树提供应用程序的当前状态。 4 检查路由,数据选项卡和库信息 您可以看到检查
英文原文: http://emberjs.com/guides/getting-ember/index/ Ember构建 Ember的发布管理团队针对Ember和Ember Data维护了不同的发布方法。 频道 最新的Ember和Ember Data的 Release,Beta 和 Canary 构建可以在这里找到。每一个频道都提供了一个开发版、最小化版和生产版。更多关于不同频道的信息可以查看博客
ember-emojione ember-emojione is your emoji solution for Ember, based on the EmojiOne project. EmojiOne version 2 is used, which is free to use for everyone (CC BY-SA 4.0), you're only required to giv
Ember 3D Ember 3D is an Ember addon for using Three.js - an easy to use, lightweight, javascript 3D library. It is designed to: Prescribe a solid file structure to Three.js code using ES6 modules. Ena
Ember Table An addon to support large data set and a number of features around table. Ember Table canhandle over 100,000 rows without any rendering or performance issues. Ember Table 3.x supports: Emb
vscode-ember This is the VSCode extension to use the Ember Language Server. Features All features currently only work in Ember-CLI apps that use classic structure and are a rough first draft with a lo