File tree Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Expand file tree Collapse file tree 2 files changed +17
-9
lines changed Original file line number Diff line number Diff line change 1
1
import { Gateway } from './Gateway' ;
2
+ import * as options from './options' ;
2
3
3
4
import { AccessToken } from '../entities/AccessToken' ;
4
5
import { AuthenticatedUser } from '../entities/AuthenticatedUser' ;
@@ -125,17 +126,14 @@ export class Qiita extends Gateway {
125
126
126
127
/**
127
128
* タグ一覧を作成日時の降順で返します。
128
- * @param page ページ番号 (1から100まで)
129
- * @param perPage 1ページあたりに含まれる要素数 (1から100まで)
130
- * @param sort 並び順 (countで投稿数順、nameで名前順)
129
+ * @param options.page ページ番号 (1から100まで)
130
+ * @param options.perPage 1ページあたりに含まれる要素数 (1から100まで)
131
+ * @param options.sort 並び順 (countで投稿数順、nameで名前順)
132
+ * @param options.q [ドキュメント記載無し]
131
133
* @return タグ一覧を返す非同期反復可能オブジェクト
132
134
*/
133
- public fetchTags = ( page : string , perPage : string , sort : string ) => {
134
- return this . paginationGenerator < Tag [ ] > ( `${ this . url } ${ this . version } /tags` , {
135
- page,
136
- per_page : perPage ,
137
- sort,
138
- } ) ;
135
+ public fetchTags = ( options ?: options . FetchTagsOptions ) => {
136
+ return this . paginationGenerator < Tag [ ] > ( `${ this . url } ${ this . version } /tags` , options ) ;
139
137
}
140
138
141
139
/**
Original file line number Diff line number Diff line change
1
+ export interface FetchTagsOptions {
2
+ /** ページ番号 (1から100まで) */
3
+ page ?: string ;
4
+ /** 1ページあたりに含まれる要素数 (1から100まで) */
5
+ perPage ?: string ;
6
+ /** 並び順 (countで投稿数順、nameで名前順) */
7
+ sort ?: 'count' | 'name' ;
8
+ /** [ドキュメント記載無し] */
9
+ q ?: string ;
10
+ }
You can’t perform that action at this time.
0 commit comments