Giter VIP home page Giter VIP logo

airtable-java's Introduction

Maven Central master build Test Coverage License

airtable-java

This is a Java API client for Airtable.

The Airtable API provides a simple way of accessing data within Java projects. More information about the Airtable API for a specific Airtable Base can be found at https://airtable.com/api.

Installation

airtable-java is available from Maven Central and requires at least Java 8.

Gradle

Add airtable-java to the dependencies section of your build.gradle:

dependencies {
    ...
    implementation 'com.tryadhawk:airtable-java:2.0.5'
    ...
}

Maven

Add airtable-java to the dependencies section of your pom.xml

<dependencies>
    ...
    <dependency>
        <groupId>com.tryadhawk</groupId>
        <artifactId>airtable-java</artifactId>
        <version>2.0.5</version>
    </dependency>
    ...
</dependencies>

Usage

Creating an Instance

Airtable airtable = Airtable.builder()
    .config(Configuration.builder().apiKey("API_KEY").build())
    .build()
    .buildAsyncTable("BASE_ID", "TABLE_NAME", SomeClass.class);

where API_KEY is the key to authenticate to the Airtable API, BASE_ID is the ID of the Airtable Base (found in Airtable API documentation), TABLE_NAME is the name of the table to access, and SomeClass is the class to map row data to.

See How do I get my API key for details on retrieving your API key

The Airtable class provides factory methods for building both synchronous and asynchronous table clients. Additional configuration settings and customization are available in the Configuration and Airtable classes.

airtable-java uses AsyncHttpClient for HTTP communication, slf4j for logging, Jackson for object mapping, and RxJava for asynchronous programming.

Customizing Column Mapping

airtable-java uses Jackson for mapping row data to objects. For cases where the field name and the column name are different, add @JsonProperty("columnName") to the field to configure the name used for mapping the column to a field.

Request Limits

The Airtable API is limited to 5 requests per second. If you exceed this rate, you will receive a 429 status code and will need to wait 30 seconds before subsequent requests will succeed. By default, airtable-java will automatically wait between 30 and 35 seconds and retry the request up to 5 times.

Building

The library is build with Java 8 and Gradle. Run ./gradlew build in Linux/Mac or gradlew build in Windows.

airtable-java uses Project Lombok for immutable value classes. Additional setup may be required to build using an IDE (IntelliJ, Eclipse).

Contributing

See CONTRIBUTING.md

License

MIT License, see LICENSE

airtable-java's People

Contributors

codacy-badger avatar cwilbur12 avatar dependabot-preview[bot] avatar dependabot[bot] avatar stritti avatar twinklehawk avatar vcmboot avatar zelle97 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.