aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/api
Commit message (Collapse)AuthorAgeFilesLines
* API: POST/PUT Link - properly parse tags stringArthurHoaro2020-12-292-6/+27
| | | | | | Even though the documentation specify that tags should be passed as an array, tags string is actually allowed. So this adds a proper parsing with configured separator. Related to #1651
* Apply PHP Code Beautifier on source code for linter automatic fixesArthurHoaro2020-11-097-10/+15
|
* Merge pull request #1616 from dimtion/fix-api-redirectArthurHoaro2020-10-291-1/+1
|\ | | | | API postLink: change relative path to absolute path
| * postLink: change relative path to absolute pathLoïc Carr2020-10-281-1/+1
| |
* | Add strict types for bookmarks managementArthurHoaro2020-10-132-11/+14
| | | | | | | | | | | | | | | | Parameters typing and using strict types overall increase the codebase quality by enforcing the a given parameter will have the expected type. It also removes the need to unnecessary unit tests checking methods behavior with invalid input.
* | Add mutex on datastore I/O operationsArthurHoaro2020-10-131-0/+2
| | | | | | | | | | | | To make sure that there is no concurrent operation on the datastore file. Fixes #1132
* | Merge pull request #1525 from ArthurHoaro/feature/rest-api-bookmark-datesArthurHoaro2020-10-133-4/+14
|\ \ | | | | | | REST API: allow override of creation and update dates
| * | REST API: allow override of creation and update datesArthurHoaro2020-08-293-4/+14
| | | | | | | | | | | | | | | | | | | | | Note that if they're not provided, default behaviour will apply: creation and update dates will be autogenerated, and not empty. Fixes #1223
* | | Revert unrelated changes and add unit testsArthurHoaro2020-09-301-7/+17
| | |
* | | Fix identationChristoph Stoettner2020-09-301-5/+5
| | |
* | | Change to ->container->environmentChristoph Stoettner2020-09-301-18/+10
| | |
* | | Workaround for hoster (ionos)Christoph Stoettner2020-09-291-2/+6
|/ / | | | | | | | | | | The hoster writes the environment variable with bearer token to REDIRECT_HTTP_AUTHORIZATION and needs to provide RewriteBase / to .htaccess
* | Better support for notes permalinkArthurHoaro2020-07-281-1/+1
| |
* | Process main page (linklist) through Slim controllerArthurHoaro2020-07-231-1/+8
|/ | | | | Including a bunch of improvements on the container, and helper used across new controllers.
* Apply the new system (Bookmark + Service) to the whole code baseArthurHoaro2020-01-187-118/+110
| | | | See https://github.com/shaarli/Shaarli/issues/1307
* Run Unit Tests against PHP 7.4ArthurHoaro2020-01-171-0/+4
| | | | | | | | Bump PHPUnit version and fix unit test - Globals are handled differently and are persistent through tests - Tests without assertions are marked as risky: some of them are just meant to check that no error is raised.
* Merge pull request #1271 from ArthurHoaro/hotfix/thumb-note-retrieveArthurHoaro2019-03-021-1/+1
|\ | | | | Do not try to retrieve thumbnails for internal link
| * Do not try to retrieve thumbnails for internal linkArthurHoaro2019-02-241-1/+1
| | | | | | | | Also adds a helper function to determine if a link is a note and apply it across multiple files.
* | Remove the redirector settingArthurHoaro2019-02-091-3/+1
|/ | | | Fixes #1239
* Optimize and cleanup importsVirtualTam2019-01-137-12/+7
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* namespacing: \Shaarli\Bookmark\LinkDBVirtualTam2019-01-122-2/+2
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* namespacing: \Shaarli\Http\Base64UrlVirtualTam2019-01-121-3/+3
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* namespacing: \Shaarli\HistoryVirtualTam2019-01-121-1/+1
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* lint: apply phpcbf to application/VirtualTam2018-12-027-12/+12
| | | | Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* Implements Tags endpoints for Shaarli's REST APIArthurHoaro2018-06-044-4/+213
| | | | | | | | | | | | Endpoints: * List All Tags [GET] * Get a tag [GET] * Update a tag [PUT] * Delete a tag [DELETE] Fixes #904 References shaarli/api-documentation#34
* PSR: use elseif instead of else ifArthurHoaro2018-02-282-4/+4
| | | | See https://www.php-fig.org/psr/psr-2/\#51-if-elseif-else
* History: fix entries orderArthurHoaro2017-05-071-1/+0
|
* Add history entries for API endpointArthurHoaro2017-05-074-5/+16
| | | | CHANGED: datetime is now store as an object in history store file
* API: Get History endpointArthurHoaro2017-05-071-0/+71
| | | | See http://shaarli.github.io/api-documentation/#links-history-get
* API: add DELETE endpointArthurHoaro2017-05-071-0/+23
| | | | | | Based on #840 See http://shaarli.github.io/api-documentation/\#links-link-delete
* REST API: implement PUT methodArthurHoaro2017-05-072-0/+68
| | | | | * Related to #609 * Documentation: http://shaarli.github.io/api-documentation/#links-link-put
* REST API: implement POST link serviceArthurHoaro2017-03-273-3/+86
|
* application: introduce the Shaarli\Config namespaceVirtualTam2017-03-041-1/+1
| | | | | | | | | | | Namespaces have been introduced with the REST API, and should be generalized to the whole codebase to manage object scope and benefit from autoloading. See: - https://secure.php.net/manual/en/language.namespaces.php - http://www.php-fig.org/psr/psr-4/ Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* REST API: implements getLink by ID serviceArthurHoaro2017-02-192-2/+55
| | | | See http://shaarli.github.io/api-documentation/#links-link-get
* REST API - getLinks: support the visibility parameterArthurHoaro2017-01-171-3/+2
|
* Update LinkFilter to be able to filter only public linksArthurHoaro2017-01-161-1/+2
| | | | | | No update regarding the UI or the API for now Fixes #758
* Merge pull request #727 from ArthurHoaro/api/getlinksArthurHoaro2017-01-152-0/+117
|\ | | | | REST API: implement getLinks service
| * REST API: implement getLinks serviceArthurHoaro2017-01-152-0/+117
| | | | | | | | See http://shaarli.github.io/api-documentation/#links-links-collection-get
* | API: expect JWT in the Authorization headerVirtualTam2017-01-151-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relates to https://github.com/shaarli/Shaarli/pull/731 Added: - require the presence of the 'Authorization' header Changed: - use the HTTP Bearer Token authorization schema See: - https://jwt.io/introduction/#how-do-json-web-tokens-work- - https://tools.ietf.org/html/rfc6750 - http://security.stackexchange.com/q/108662 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* | API: fix JWT signature verificationVirtualTam2017-01-041-7/+5
|/ | | | | | | | | | | | | | | | | | | | | | Fixes https://github.com/shaarli/Shaarli/issues/737 Added: - Base64Url utilities Fixed: - use URL-safe Base64 encoding/decoding functions - use byte representations for HMAC digests - all JWT parts are Base64Url-encoded See: - https://en.wikipedia.org/wiki/JSON_Web_Token - https://tools.ietf.org/html/rfc7519 - https://scotch.io/tutorials/the-anatomy-of-a-json-web-token - https://jwt.io/introduction/ - https://en.wikipedia.org/wiki/Base64#URL_applications - https://secure.php.net/manual/en/function.base64-encode.php#103849 Signed-off-by: VirtualTam <virtualtam@flibidi.net>
* REST API structure using Slim frameworkArthurHoaro2016-12-158-0/+428
* REST API routes are handle by Slim. * Every API controller go through ApiMiddleware which handles security. * First service implemented `/info`, for tests purpose.