Jeremy Benoist
54c2d164a3
Merge remote-tracking branch 'origin/master' into 2.3
2017-05-09 13:55:31 +02:00
adev
b60a666df2
Fix API pagination is broken if perPage is custom value
...
Fix #2720
2017-05-08 16:27:16 +02:00
adev
08f29ae7b6
Create a new entry via API even when its content can't be retrieved
...
Fix #2988
2017-05-08 14:57:25 +02:00
Jeremy Benoist
72db15ca5d
Little refacto and send 400 on reaching urls limit
2017-05-05 12:05:50 +02:00
adev
ab9eb5cdb7
Fix display the form errors correctly
...
Use `property_path` form option to map underscored form fields
to object properties
@see https://github.com/symfony/symfony/issues/9162#issuecomment-25431148
Fix #3067
2017-05-05 00:12:16 +02:00
Nicolas Lœuillet
efd351c98f
Added limit
2017-05-01 09:26:12 +02:00
Jeremy Benoist
719ba257d3
Fix tests
2017-05-01 09:26:12 +02:00
Nicolas Lœuillet
a7abcc7b7a
Splitted the endpoint in two
2017-05-01 09:26:12 +02:00
Nicolas Lœuillet
1eca7831a6
Added API endpoint to handle a list of URL
...
By passing an array, you can add / delete URL in mass (bulk request)
2017-05-01 09:25:34 +02:00
Jeremy Benoist
dcbebc17aa
Fix tests
2017-04-29 12:58:39 +02:00
Nicolas Lœuillet
80299ed282
Added endpoint to handle URL list to add/delete tags
2017-04-24 12:24:17 +02:00
Nicolas Lœuillet
d1fc590211
Added API endpoint to handle a list of URL and to add/delete tags
2017-04-24 11:12:41 +02:00
Thomas Citharel
ca9a83ee51
return id of article instead of true if entry exists
2017-02-24 11:31:31 +01:00
Jeremy Benoist
3ef75cc4e3
Be consistent between migration & schema definition
2016-12-19 14:24:19 +01:00
Jeremy Benoist
21e7ccef3d
Fix tests & deprecation notice
2016-12-15 21:38:16 +01:00
Jeremy Benoist
5cd0857e3c
Return 304 when content isn't reloaded using the API
...
Previously it was a 400 but this is more related to a real error.
Using the API user should only know the content got reloaded or not.
If reloaded: 200 otherwise: 304.
2016-11-22 10:45:19 +01:00
Jeremy Benoist
56da73969a
Return an explicit error if reload fail
2016-11-20 16:25:13 +01:00
Jeremy Benoist
70584b42aa
Fixing tests
2016-11-20 15:15:13 +01:00
Jeremy Benoist
0a6f4568b5
Add ability to reload entry from API
2016-11-20 13:08:41 +01:00
Jeremy Benoist
001cc7168a
Cleanup
2016-11-03 18:01:25 +01:00
Jeremy Benoist
864c1dd23a
Fix rest controller merge
2016-11-03 17:29:16 +01:00
Jeremy Benoist
5a619812ca
Merge remote-tracking branch 'origin/master' into 2.2
2016-11-03 16:41:29 +01:00
Jeremy Benoist
7816eb622d
Add entry.saved event to import & rest
2016-11-02 07:10:23 +01:00
Nicolas Lœuillet
bc4564a709
Removed useless route
2016-10-28 15:24:58 +02:00
Nicolas Lœuillet
900c844861
Exploded WallabagRestController into many controllers
...
Fix #2503
2016-10-28 14:46:30 +02:00
Nicolas Lœuillet
23406ca3f1
Added relation between API Client and User
...
Fix #2062
2016-10-24 21:56:28 +02:00
Jeremy Benoist
aa4741091f
Add test on /api/annotations
...
Fix controller forward in WallabagRestController.
Update PHPDoc so it is sorted the same way as others one
Duplicate all annotations test to use both api & normal way
Also, make annotation tests independent to each other
2016-10-22 12:09:20 +02:00
Jeremy Benoist
3199ec4702
CS
2016-10-22 09:17:01 +02:00
Nicolas Lœuillet
d9b7768dca
Added a missing namespace
2016-10-22 09:06:07 +02:00
Thomas Citharel
0c271b9eb0
fix cs and phpdoc
2016-10-22 09:06:07 +02:00
Thomas Citharel
b1e92f8c14
cs
2016-10-22 09:06:07 +02:00
Thomas Citharel
1eea248bb0
move code
2016-10-22 09:06:07 +02:00
Thomas Citharel
c7935f32d2
cs
2016-10-22 09:06:07 +02:00
Thomas Citharel
351eb8d97e
bring annotations to API
2016-10-22 09:06:07 +02:00
Jeremy Benoist
5960aa1ffc
CS
2016-10-15 18:00:08 +02:00
Jeremy Benoist
f1c3f68e90
ApiDoc & Route annotation were conflicted
...
The generated error was “Unable to guess how to get a Doctrine instance from the request information.”.
I haven’t checked deeper in Doctrine (I know it was coming from the DoctrineParamConverter).
Anyway, I check for FosRest possiblity to add extra format without allowing them for every route (like it was done in the first place).
I finally found a way but it then seems all request goes to the FormatListener of FosRest so I needed to add a custom rules to match all request to be sure we don’t get a 406 error from FosRest.
Should be ok now …
2016-10-15 16:46:42 +02:00
Jeremy Benoist
b1b561da51
Merge pull request #2372 from pmartin/api-get-entry-as-epub
...
API: ability to export entry in all available format (epub, pdf, etc...)
2016-10-12 14:06:33 +02:00
Nicolas Lœuillet
2a5ff7f554
Merge pull request #2411 from wallabag/fix-entities
...
Fix entities definition
2016-10-10 08:02:25 +02:00
Jeremy Benoist
8dc4cd0f25
Fix entities definition
...
As per Doctrine said in the debug tool bar:
- The field Wallabag\ApiBundle\Entity\Client#refreshTokens is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Wallabag\ApiBundle\Entity\RefreshToken#client does not contain the required 'inversedBy="refreshTokens"' attribute.
- The field Wallabag\ApiBundle\Entity\Client#accessTokens is on the inverse side of a bi-directional relationship, but the specified mappedBy association on the target-entity Wallabag\ApiBundle\Entity\AccessToken#client does not contain the required 'inversedBy="accessTokens"' attribute.
2016-10-09 20:51:37 +02:00
Jeremy Benoist
28bb48905a
Optimize the way tag list is rendered
...
Instead of retrieve all informations about entries of a tag to just count them, we’ll count them before with a fastest query.
Also change the layout of the tag list in material design
2016-10-09 18:55:22 +02:00
Nicolas Lœuillet
93a95c09bf
Merge pull request #2351 from wallabag/fix-api-client-deletion
...
Changed relation between API client and refresh token
2016-10-08 13:31:54 +02:00
Nicolas Lœuillet
4ad6f5878a
Merge pull request #2393 from wallabag/api-urls-exist
...
Ability to check multiple urls in API
2016-10-08 13:31:31 +02:00
Jeremy Benoist
3f3a60879e
Add entry export in API
...
Export isn't available for json & xml because user can use the default
entry endpoint instead.
2016-10-08 12:59:19 +02:00
Pascal MARTIN
24de866534
API: getEntry can return EPUB
2016-10-08 12:05:41 +02:00
Pascal MARTIN
3d4b0b3064
Routing: epub format is allowed for API
2016-10-08 12:05:40 +02:00
Jeremy Benoist
ee32248f43
Ensure access_token are removed
...
When we remove the client, we should ensure that access_token are also removed.
To ensure that, I created a test that generated an access_token. So when we remove the client, this association should be cascaded and shouldn’t generate an error.
Also I moved some Api related stuff to the ApiBundle (like the developer controler and ClientType form)
2016-10-08 00:05:41 +02:00
Jeremy Benoist
ac8cf632bb
Ensure orphan tag are remove in API
...
When the association between a tag and an entry is removed, if the tag doesn’t have other entries, we can remove it.
Also add more tests for that part and ensure TagControllerTest is isolated from the rest of the test suite (finally!)
2016-10-07 23:31:53 +02:00
Jeremy Benoist
f0abc22d09
Ability to check multiple urls in API
2016-10-07 20:37:01 +02:00
Jeremy Benoist
0b174d69d7
Fix typo & add test
2016-10-05 19:30:56 +02:00
Thomas Citharel
5d39243068
Fix exists API call
...
Boo
2016-10-05 15:28:36 +02:00
Nicolas Lœuillet
b0da721a52
Changed relation between API client and refresh token
...
Fix #2350
2016-10-03 21:39:01 +02:00
Jeremy Benoist
c3f8b428dd
Fix parameters in API _links
...
We forgot to pass them to the factory
2016-10-02 15:41:08 +02:00
Jeremy Benoist
3583cadf6f
CS
2016-10-02 01:43:50 +02:00
Jeremy Benoist
6273fefd5d
Add an exists endpoint in API
...
It should allow third party to check if an url was already saved by a user
2016-10-01 17:15:28 +02:00
Jeremy Benoist
faa86e06ba
Fix tags count in menu
...
Move enable cache for Tag in the Entity because function `find*` should return result and not a Query
2016-09-25 12:03:49 +02:00
Jeremy Benoist
60faee002c
Re-user JsonResponse
...
Since Symfony 3.1 we can define the json of a JsonResonse using `->setJson()`
2016-09-08 12:03:38 +02:00
Nicolas Lœuillet
429d86f388
Added tags counter in sidebar (material theme)
2016-09-04 20:53:28 +02:00
Jeremy Benoist
a0e1eafc35
Add some tests
...
Also, retrieve tag from the request instead of the query (which will be the same but it's more easy to test).
Moved down `deleteTagAction` because it conflicted with the new action:
api_delete_tag => /api/tags/{tag}.{_format}
api_delete_tags_label => /api/tags/label.{_format}
And finally, throw exception when a tag is not found before removing it.
2016-08-23 07:26:58 +02:00
Thomas Citharel
9bf83f1fb8
CS
2016-08-23 07:26:58 +02:00
Thomas Citharel
4da01f492b
Delete tag or tags by label
...
Tests not included
2016-08-23 07:26:58 +02:00
Jeremy Benoist
e71cef0bb8
Fix typos in field name
2016-08-23 07:26:58 +02:00
Thomas Citharel
119914e65d
added name on client
2016-08-23 07:26:58 +02:00
Thomas Citharel
9c545fe028
Added name on client
...
- Fix typos in field name
- Added migration for name field in API client table
Manually cherry-picked from PR
https://github.com/wallabag/wallabag/pull/2171
2016-08-22 20:18:27 +02:00
Thomas Citharel
28803f106b
Add filter for tags on API
2016-06-29 09:55:57 +02:00
Thomas Citharel
e43c78abd9
CS
2016-06-25 23:19:21 +02:00
Thomas Citharel
e5fb89e5d3
Add since parameter
2016-06-25 21:05:50 +02:00
Jeremy Benoist
23634d5d84
Jump to Symfony 3.1
2016-06-22 17:59:35 +02:00
Jeremy Benoist
6922168420
CS
2016-05-19 07:41:54 +02:00
Yuriy Evdokimov
bba271e619
Tests for issue #2089
2016-05-18 15:37:07 +05:00
Yuriy Evdokimov
614a0bfd86
PATCH also clears starred and archived signs
2016-05-18 15:28:49 +05:00
Yuriy Evdokimov
873e380658
Starred and Archived clears if article is already exists
2016-05-18 10:30:33 +05:00
Nicolas Lœuillet
51a15609b3
Set the title via POST /api/entries
...
Fix #2009
2016-05-02 12:50:42 +02:00
Jeremy Benoist
4094ea4771
Convert array + phpDoc
...
Thanks for https://github.com/thomasbachem/php-short-array-syntax-converter
2016-04-12 12:25:29 +02:00
Nicolas Lœuillet
0135c98b24
Remove int cast
2016-04-10 14:15:21 +02:00
Nicolas Lœuillet
5c3ca4fe9e
All the entries are fetched via GET /api/entries
...
Fix #1863 : only the unread entries were fetched with GET /api/entries entrypoint. Now, all the entries are fetched
2016-04-09 21:13:56 +02:00
Jeremy Benoist
2baca964f3
Simplify tag creation from entry
...
Testing that a tag exist or is assigned to the current entry isn't important in the tag controler since the `assignTagsToEntry` is already doing that job.
So it simplify the controller.
2016-03-27 17:09:33 +02:00
Thomas Citharel
bc2b947cd5
add check
2016-03-16 22:47:12 +01:00
Thomas Citharel
0cd0d6eb8c
fix updating entry status through API
2016-03-16 22:43:32 +01:00
Thomas Citharel
2f60e5ea75
check if archive/star parameters without quotes work
2016-03-16 22:22:12 +01:00
Thomas Citharel
189ef6342a
use integers for archived/starred status
2016-03-16 22:22:12 +01:00
Thomas Citharel
0d3043a29c
fix api properties and typo
2016-03-16 22:22:12 +01:00
Thomas Citharel
3107f92acb
Don't add entry through API if it already exists
2016-03-16 21:07:01 +01:00
Thomas Citharel
bc44aa5784
add tests on user in API responses
2016-03-15 19:31:31 +01:00
Jeremy Benoist
09d8bb6fa2
Improve tests
...
- add more tests for coverage
- add a test on annotation deletion
- fix post annontation with ranges
2016-03-11 17:59:42 +01:00
Thomas Citharel
6f8310b445
typos & cs
2016-03-08 09:22:25 +01:00
Vincent
9761bfa18e
write test for version
2016-03-07 15:16:27 +01:00
Vincent
2b4770301c
Add version in API
2016-03-07 15:00:03 +01:00
Jeremy Benoist
fba9e7d44d
Remove 'content' from API
...
Waiting to find a good solution to avoid side problem since user can no define the content
2016-03-04 11:46:18 +01:00
Thomas Citharel
11a452813c
use booleans instead of empty
2016-03-04 11:39:21 +01:00
Thomas Citharel
816ad4051b
add more properties for entries #1634
2016-03-04 11:39:20 +01:00
Jeremy Benoist
c2656f96d4
Move assignTagsToEntry in ContentProxy helper
2016-02-19 14:22:20 +01:00
Nicolas Lœuillet
b0b893eafd
[ #1604 ] First draft to fix SensioLabsInsight report
2016-01-22 21:12:11 +01:00
Jeremy Benoist
1d76102a24
Fix recent update
...
- some missing url parameters from WallabagRestController & EntryController
- use a service for `EntryFilterType` to use fully qualified name instead (so changing class signature)
- update ImportBundle (url & form)
2016-01-15 09:35:38 +01:00
Jeremy Benoist
619cc45359
Symfony Upgrade Fixer FTW
...
symfony-upgrade-fixer fix src/Wallabag/
2016-01-15 09:35:38 +01:00
Jeremy Benoist
8eedc8cfac
Few phpDoc fix
...
And some little mistakes
2016-01-03 11:15:44 +01:00
Jeremy Benoist
4059a061c0
Fix the way to remove a tag from all user entries
2015-12-29 15:43:32 +01:00
Jeremy Benoist
1bb1939ab7
Cleanup tests
...
- WallabagRestController: remove the tag deletion from the API since we can't remove a tag now, we only remove reference to entries
- RuleBasedTaggerTest: remove workaround for asserting tag are equal since problem was related to mock expects (_call instead of findOneByLabel which was removed from the tag repository)
2015-12-29 15:04:46 +01:00
Jeremy Benoist
01fddd0cb2
Fix parameters regarding documentation
...
Parameters are `star` & `archived`, not `is_starred` & `is_archived`
2015-12-29 14:54:55 +01:00
Jeremy Benoist
fc73222723
Remove user reference in tag
...
Fix #1543
2015-12-29 14:50:52 +01:00
Jeremy Benoist
8a493541fa
Re-enable test on doctrine command
...
It will slow down the whole test suite (because it'll use doctrine command).
Remove unecessary `KernelTestCase`.
Also rename `AbstractControllerTest` to `WallabagApiTestCase` for consistency.
2015-11-07 14:16:13 +01:00
Jeremy Benoist
18f8f32f70
Fix security.context deprecation
2015-11-07 00:17:37 +01:00
Nicolas Lœuillet
1210dae105
remove old implementation for login/register/recover
2015-10-03 13:31:48 +02:00
Nicolas Lœuillet
2c13918acc
add test for confirmed registration
2015-10-03 13:30:43 +02:00
Nicolas Lœuillet
772732531e
check authentication on each API route
2015-10-03 13:30:43 +02:00
Nicolas Lœuillet
fcb1fba5c2
* public registration
...
* remove WSSE implementation
* add oAuth2 implementation
2015-10-03 13:30:43 +02:00
Jeremy Benoist
f1e29e69cb
CS
2015-09-10 22:00:53 +02:00
Jeremy Benoist
558d9aabab
Move fetching content in a separate class
2015-09-10 21:57:25 +02:00
Jeremy Benoist
d13de40db6
Update url from graby
2015-08-24 19:52:31 +02:00
Jeremy Benoist
a1413a3da9
CS
2015-08-24 12:35:02 +02:00
Jeremy Benoist
fad316151c
Integrate graby
2015-08-24 12:27:17 +02:00
Jeremy Benoist
e6f55346fd
Add test on getting starred entries using the API
2015-08-20 20:39:26 +02:00
Jeremy Benoist
8ce32af612
CS
...
We shouldn't forget to run `php-cs-fixer` time to time
2015-08-20 07:53:55 +02:00
Francois Gravelaine
9fb6ac830f
Adds pagerfanta paginator everywhere, modifies article routing. Change API for is_starred and is_archived
2015-07-28 23:23:49 +02:00
Jeremy Benoist
4346a86068
CS
2015-05-30 13:59:33 +02:00
Jeremy
9744e97131
Fix tests
2015-04-01 21:59:13 +02:00
Jeremy
769e19dc4a
Move API stuff in ApiBundle
2015-04-01 21:59:12 +02:00
Nicolas Lœuillet
f8bf895254
routing for API, trying to respect #414
2015-01-29 16:56:58 +01:00
Nicolas Lœuillet
38ba7ed972
skeleton for DELETE and PATCH methods
2015-01-28 18:18:57 +01:00
Nicolas Lœuillet
3e5a342f65
bundle for API
2015-01-28 18:14:04 +01:00