Coder Social home page Coder Social logo

sybit-education / airtable.java Goto Github PK

View Code? Open in Web Editor NEW
48.0 48.0 25.0 9.74 MB

Java API for Airtable (http://www.airtable.com)

License: MIT License

Java 100.00%
airtable airtable-api airtable-client api-client crud hacktoberfest hacktoberfest2022 hacktoberfest2023 java java-api

airtable.java's Introduction

Sybit-Education

Website of Organisation on Github.

airtable.java's People

Contributors

codacy-badger avatar dependabot[bot] avatar fstuff avatar joesondow avatar stritti avatar vcmboot avatar zelle97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

airtable.java's Issues

Support for abstract class inheritance

Currently the SDK doesn't support for Abstract field inheritance.
UserInfo is defined as follow: (written in Kotlin)

abstract class UserInfo(
        @SerializedName("First Name")
        @NotBlank
        open var firstName: String? = null,

        @SerializedName("Last Name")
        @NotBlank
        open var lastName: String? = null ) {}

and I have Student class which inherit from UserInfo as follow

class Student constructor() : UserInfo() {

    @SerializedName("Student CMKL ID")
    var studentId: String? = null
// ... more fields
)

but when I do select() the firstName and lastName aren't mapped out.

Getting record id from table

@stritti I think i have found a bug.

Trying to print all record id's from a formula field in airtable. The formula is using the RECORD_ID() function to display all the ID's.

String[] field= {"Record_ID"};


        System.out.println(table.select(field).size());
        List<User> recordIDs = table.select(field);

        for (User user : recordIDs) {
            System.out.println(user.getRecordID().toString());
          }

It returns null for each value but it .size() shows all values are there.

Any help would be much appreciated!

JCenter Shutdown

Move Artifacts

  • As JCenter is being shutdown in 2022, this api will need to be moved soon. Maven central would be appreciated.

Error when trying to update

I am getting this error "Field "People ID" cannot accept a value because the field is computed (INVALID_VALUE_FOR_COLUMN)" and "Field "Talent's Name" cannot accept a value because the field is computed (INVALID_VALUE_FOR_COLUMN)", when I try to update a record. The only field I update is a field called "Status" and nothing else, but for some reason the API tried to update every column that the table has. Basically it tries to update lookup fields even though I don't want it to change them. Can you please help me?

image
image

Unexpected NOT FOUND error when select()ing a table with a accented name

Hello Airtable team,
Just stumbled upon a weird error while trying to select rows from a table that has an accented name. (éèà...)

when I do a base.getTable("Accentué").select() it throws a NOT FOUND error. I first suspected that the name should be URLEncoded, which I did: getTable(URLEncoder.encode("Accentué", StandardCharsets.UTF_8)).select() but it hit me with the same error. Can't figure out why. Also, when I do a curl (with and without url encode), it works as expected.

Do you have any ideas ?

Examples

Hi, just wondering where i can find examples for this API? The links in your README don't work.

Could you let me where I could find some?

EDIT: Specifically I'm looking for examples on getting records of table name with the specified view. I keep getting endpoint url null pointer exceptions.

Thanks!

Spurious "Invalid cookie header" warnings

This spurious warning shows up in my logs every time I execute a remote call from my local machine or from AWS Lambda (in GMT) to Airtable. It happens on both reads and writes. I'm just using the airtable.java library with no customizations of the cookie headers.

WARNING: Invalid cookie header: "Set-Cookie: brw=bfwPbO3TrDZZa5sPw; path=/; expires=Fri, 20 Mar 2020 03:42:39 GMT; domain=.airtable.com; secure; httponly". Invalid 'expires' attribute: Fri, 20 Mar 2020 03:42:39 GMT

Android HTTP AllowAllHostnameVerifier Error

Hey, I'm running into this HTTP error when I attempt to initialize and configure the Airtable object. Seems like it's common problem from my search online but I'm not familiar with HTTP so I'm still not sure how to resolve this issue. I'm running the app on an Pixel 3 API 29 emulator using Android Studio 3.5.1. I'm using airtable.java version 0.2.0. Is my project somehow using the wrong Apache HTTP library?

Updated: I see that there's an android port here https://github.com/Sybit-Education/airtable.android but I don't know how to apply it. Could provide some instructions or point me to an article please?

Here is my code (inside onCreate of MainActivity):

    // Initialize Airtable
    try {
        Airtable airtable = new Airtable();
        airtable.configure(AIRTABLE_API_KEY); // Runtime crash happens in this call
    } catch (AirtableException e) {
        e.printStackTrace();
    }

And this is the error I get:
E/AndroidRuntime: FATAL EXCEPTION: main Process: saeed.org.recipeat, PID: 15322 java.lang.NoSuchFieldError: No static field INSTANCE of type Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; in class Lorg/apache/http/conn/ssl/AllowAllHostnameVerifier; or its superclasses (declaration of 'org.apache.http.conn.ssl.AllowAllHostnameVerifier' appears in /system/framework/framework.jar!classes3.dex) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:146) at org.apache.http.conn.ssl.SSLConnectionSocketFactory.getSocketFactory(SSLConnectionSocketFactory.java:174) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.getDefaultRegistry(PoolingHttpClientConnectionManager.java:115) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:122) at com.mashape.unirest.http.options.Options.refresh(Options.java:72) at com.mashape.unirest.http.options.Options.<clinit>(Options.java:46) at com.mashape.unirest.http.options.Options.setOption(Options.java:35) at com.mashape.unirest.http.Unirest.setProxy(Unirest.java:65) at com.sybit.airtable.Airtable.setProxy(Airtable.java:185) at com.sybit.airtable.Airtable.configureProxy(Airtable.java:213) at com.sybit.airtable.Airtable.configure(Airtable.java:155) at com.sybit.airtable.Airtable.configure(Airtable.java:113) at com.sybit.airtable.Airtable.configure(Airtable.java:100) at saeed.org.recipeat.MainActivity.onCreate(MainActivity.java:45) at android.app.Activity.performCreate(Activity.java:7802) at android.app.Activity.performCreate(Activity.java:7791) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1299) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3245) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Table warns about using @SerializedName even if you already are using it

Table does not really use any logic when deciding whether or not to throw a warning re. the need to use the SerializedName annotation.
Excerpt from Table.java:

  if (key.contains(" ") || key.contains("-")) {
            LOG.warn("Annotate columns having special characters by using @SerializedName for property: [" + key + "]");

The result is that every time there is a select operation this warning is generated. It cruds up logs and is therefore annoying. However, it appears not to break anything.

The solution would be to check from the presence of the SerializedName annotation, and only throw the warning if it is not present.

Release in Maven

Hello

Could you deploy 0.2.2 version in maven repository

Thank you

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.