deck icon indicating copy to clipboard operation
deck copied to clipboard

Provide public REST-API (and or documentation)... [$25 awarded]

Open stefan-niedermann opened this issue 9 years ago • 30 comments

... so one can write native applications that are in sync with the web interface :)


The $25 bounty on this issue has been claimed at Bountysource.

stefan-niedermann avatar Mar 29 '17 20:03 stefan-niedermann

Heya, is someone already working on this?

If not, I'll do it. This is my first work on Nextcloud stuff, though, so I'll benefit from some hand-holding.

Thanks!

srbaker avatar Apr 13 '17 21:04 srbaker

@srbaker Sorry for the delay. Sure, It would be awesome if you would jump in and help us improve deck.

It would require implementing some extra API controllers similar to what the news app does: https://github.com/nextcloud/news/blob/master/lib/Controller/FeedApiController.php

Although it would be great to have some concept before starting the implementation. You can have a look at the v2 API proposal of the news app here as well: https://github.com/nextcloud/news/blob/master/docs/externalapi/External-Api.md

If you have any further questions feel free to ask or ping me on irc.

juliusknorr avatar Apr 22 '17 13:04 juliusknorr

Perfect, thanks. I'll take a look at this on the weekend. I'm very excited to be able to replace Trello with something that I can share with my family. And I really want there to be a desktop and Android app as well. :)

srbaker avatar Apr 24 '17 09:04 srbaker

Android app

And that's what i am interested in to develop ;-)

stefan-niedermann avatar Apr 24 '17 09:04 stefan-niedermann

@srbaker I've invited you to be a repo contributer, so you can directly push branches when developing.

juliusknorr avatar May 01 '17 17:05 juliusknorr

Perfect, thanks! I didn't get as far as I wanted this weekend, but I have several hours in the evenings this week. I'll push up the in-progress stuff once I get the first simplest endpoint working.

Cheers!

srbaker avatar May 01 '17 19:05 srbaker

@srbaker @juliushaertl If we have a REST-API it shouldn't be that complicated to add an iOs/Android application. Have done similar to some home automation stuff

moritz31 avatar May 08 '17 09:05 moritz31

@srbaker Any news from your api implementation? Is there anything you need help with?

juliusknorr avatar Jun 13 '17 10:06 juliusknorr

Heya, sorry for the radio silence. Got a bit slowed down, but I have vacation time next week and I'm hoping to wrap up my work then.

srbaker avatar Jun 24 '17 18:06 srbaker

@srbaker No problem :wink: Take your time.

juliusknorr avatar Jun 27 '17 10:06 juliusknorr

Alright, it's actually moving. Lovely vacation project.

https://github.com/srbaker/deck/tree/add-json-api

I'd like help with the following:

  1. I'm really struggling by not doing this test-first, because that's my habit. I'm using curl manually as a temporary solution: When I run make test from my deck checkout, I get:
mkdir -p build/
phpunit -c tests/phpunit.xml --coverage-clover build/php-unit.coverage.xml
PHPUnit 5.4.6 by Sebastian Bergmann and contributors.

Cannot open file "/home/srbaker/Projects/nextcloud/deck/tests/../../../tests/bootstrap.php".

Makefile:78: recipe for target 'test-unit' failed
make: *** [test-unit] Error 1
  1. I'd really like feedback on codestyle, patterns I'm missing, naming, or anything. This is my first contribution, and I want to do it well, so please comment and point me in the appropritate directions.

thanks!

srbaker avatar Jul 28 '17 23:07 srbaker

I'm really struggling by not doing this test-first, because that's my habit. I'm using curl manually as a temporary solution: When I run make test from my deck checkout, I get

The unit tests require the deck directory to be inside of the apps folder of a nextcloud installation. So you need to clone nextcloud/server and then put the deck app inside apps/ for the unit tests to run. Symlinking should also work fine, in case you want to keep the repo at its original position.

I'd really like feedback on codestyle, patterns I'm missing, naming, or anything. This is my first contribution, and I want to do it well, so please comment and point me in the appropritate directions.

From a quick look I had it already looks quite good, feel free to open a WIP pull request to the deck repo already, that makes it easier to keep track of changes and comment on code sections. Two very small things that came up when looking at it:

  • lets start with api version 1.0
  • the extra parenthesis around statements like new DataResponse() in the return statements are not required

Good work so far. Thank you for getting this started.

juliusknorr avatar Jul 29 '17 08:07 juliusknorr

Thanks for your quick response. I'll spend some more time on this tonight and tomorrow evening, and get the basics in place. Cheers!

srbaker avatar Jul 29 '17 14:07 srbaker

Any update on this one?

StillOnMyWay avatar Oct 12 '17 19:10 StillOnMyWay

I'm starting a React Native mobile application as a side-project / learning exercise plugged on fake data, looking forward to this ! 😄

sylvainar avatar Oct 23 '17 08:10 sylvainar

A bit slow moving over here, but I've got some time set aside for it shortly.

srbaker avatar Oct 23 '17 14:10 srbaker

@sylvainar any news about your React Native mobile app ? I would be glad to give a hand on that project if needed.

euZebe avatar Jan 11 '18 11:01 euZebe

Is there any movement on this (or any way we can help out)?

putt1ck avatar Apr 04 '18 11:04 putt1ck

@srbaker Maybe you can give us an update if you are still on implementing it. Otherwise maybe @putt1ck could pick up the work already done and continue with that. :wink:

juliusknorr avatar Apr 05 '18 20:04 juliusknorr