Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api v2 support? #8

Open
asamiam opened this issue Feb 5, 2014 · 5 comments
Open

Api v2 support? #8

asamiam opened this issue Feb 5, 2014 · 5 comments

Comments

@asamiam
Copy link

asamiam commented Feb 5, 2014

dropTables and getTables are not working for me. I checked the API and in my account it lists v2. The top of this class is /api/v1/. Maybe that's why?

When I do a createTable after my dropTable failed, using the same name instead of resulting in an error I get a magical new table with the name and "_1" or "_2" depending on how many times it has happened. I think it would make a lot more sense to return an error in case of a name collision and have the user handle that scenario. That doesn't belong here per se but I haven't found where it happens in the cartodb repo.

@javisantana
Copy link
Contributor

Unfortunately this library is using a non-documented API. We will take a look because the api didn't changed and it should work cc @Kartones

@Kartones
Copy link
Contributor

Kartones commented Feb 5, 2014

Unfortunately the internal non-documented API has dropped support of performing a api/v1/tables GET and api/v1/tables/tablename DELETE so those two methods won't work anymore.

I'm doing some testing to allow again to both retrieve a list of table objects and drop a table, will get back as soon as I have it ready.

@Kartones
Copy link
Contributor

Kartones commented Feb 5, 2014

Should be fixed now.

New way of retrieving tables list using getTableVisualizations() and dropping a table using dropTableVisualization() is slower, as it has to:

  • First, fetch all visualizations
  • Check which ones are type=table (canonical visualizations)
  • Grab 1 by 1 each table data, and build the list
  • Finally return the list of tables

Dropping a table also needs to first fetch all visualizations.

I've marked as deprecated getTables() and dropTable() to make sure any PHP API user adapts to the format of the returned data in the new methods.

Hope it's easy for you to adapt to the new methods, but there is no quick way of restoring old behaviour :(

@asamiam
Copy link
Author

asamiam commented Feb 14, 2014

DropTableVisualization() isn't working most of the time, and seems to be breaking the relationship between my tables when it does do something.

@Ramblurr
Copy link

I can't get oauth to work with the latest git master.. is this library just hopelessly out of date now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants