Skip to content
This repository was archived by the owner on Nov 26, 2023. It is now read-only.

Commit 8146eb9

Browse files
committed
Merge branch 'release/1.2.0'
2 parents c05c603 + edd9c6f commit 8146eb9

File tree

12 files changed

+1671
-11
lines changed

12 files changed

+1671
-11
lines changed

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
77

8+
## [1.2.0] - 2017-09-24
9+
10+
### Added
11+
- `JWTClient` to create requests to the JIRA/Confluence (closes #3)
12+
- Pagination (used by `JWTClient`)
13+
- Note about using route helper in the `AppServiceProvider` to the README
14+
15+
### Fixed
16+
- Typos and code style issues
17+
- TODO section in the README
18+
819
## [1.1.0] - 2017-09-08
920

1021
### Added
@@ -28,7 +39,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2839
### Fixed
2940
- Package keywords at composer.json
3041

31-
[Unreleased]: https://github.com/brezzhnev/atlassian-connect-core/compare/v1.0.0...HEAD
42+
[Unreleased]: https://github.com/brezzhnev/atlassian-connect-core/compare/v1.2.0...HEAD
43+
[1.2.0]: https://github.com/brezzhnev/atlassian-connect-core/compare/v1.1.0...v1.2.0
3244
[1.1.0]: https://github.com/brezzhnev/atlassian-connect-core/compare/v1.0.2...v1.1.0
3345
[1.0.2]: https://github.com/brezzhnev/atlassian-connect-core/compare/v1.0.1...v1.0.2
3446
[1.0.1]: https://github.com/brezzhnev/atlassian-connect-core/compare/v1.0.0...v1.0.1

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ You can use `Descriptor` facade to customize or create from scratch your own des
154154

155155
For example, you can customize it by adding to the `app\Providers\AppServiceProvider` in `boot` section the following:
156156

157-
```
157+
``` php
158158
Descriptor::base() // base descriptor contents
159159
->setScopes(['admin' , 'act_as_user'])
160160
->withModules([
@@ -166,6 +166,27 @@ Descriptor::base() // base descriptor contents
166166
->set('version', $this->getLatestPluginVersion());
167167
```
168168

169+
> Warning: if you are using `route` helper in the `AppServiceProvider` you should have `RouteServiceProvider` defined above `AppServiceProvider` in your `app.php` config.
170+
171+
### Performing requests
172+
173+
In most of cases in development add-on for Atlassian Product you need to perform requests to the instance.
174+
175+
For this case you should use `JWTClient`. It uses [GuzzleHttp](https://github.com/guzzle/guzzle) as HTTP client and
176+
if you want to have custom handling (middlewares etc.) you can pass client instance to the constructor.
177+
178+
#### Pagination
179+
180+
If you want to send a request to an endpoint with pagination you should use `JWTClient::paginate` method. In most cases
181+
you don't need to pass paginator instance to the `JWTClient` constructor because it will instantiate automatically by resolving
182+
your Tenant product type (JIRA or Confluence), but you always can use specific paginator.
183+
184+
There are two paginators:
185+
* `JiraPaginator`
186+
* `ConfluencePaginator`
187+
188+
Of course you can extend `Paginator` class and create your own.
189+
169190
### Console commands
170191

171192
* `plugin:install` is a helper command that creates "dummy" tenant with fake data and publishes package resources (config, views, assets)
@@ -179,11 +200,11 @@ Run the following in the package folder:
179200
vendor/bin/phpunit
180201
```
181202

182-
## TODOs
203+
## TODO
183204

184-
* Add OAuth authentication method
185205
* Implement descriptor builder and validator
186-
* Implement webhooks gateway
206+
* Implement webhooks manager
207+
* Take out pagination and make more abstract
187208

188209
## Security
189210

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"require": {
2525
"php": ">=7.0",
2626
"firebase/php-jwt": "^5.0",
27+
"guzzlehttp/guzzle": "^6.3",
2728
"illuminate/support": "~5.5"
2829
},
2930
"require-dev": {

composer.lock

Lines changed: 233 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace AtlassianConnectCore\Exceptions;
4+
5+
/**
6+
* Class PaginationException
7+
*
8+
* @package AtlassianConnectCore\Exceptions
9+
*/
10+
class PaginationException extends \RuntimeException
11+
{
12+
}

0 commit comments

Comments
 (0)