File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { Item } from '../entities/Item';
8
8
import { Like } from '../entities/Like' ;
9
9
import { Project } from '../entities/Project' ;
10
10
import { Reaction } from '../entities/Reaction' ;
11
- import { Tag } from '../entities/Tag' ;
11
+ import { SearchTagResult , Tag } from '../entities/Tag' ;
12
12
import { Tagging } from '../entities/Tagging' ;
13
13
import { Team } from '../entities/Team' ;
14
14
import { TeamInvitation } from '../entities/TeamInvitation' ;
@@ -201,6 +201,15 @@ export class Qiita extends Gateway {
201
201
return this . get < Template > ( `${ this . url } ${ this . version } /templates/${ template_id } ` ) ;
202
202
}
203
203
204
+ /**
205
+ * [実験的] タグを検索します
206
+ * @param q 検索クエリ文字列
207
+ * @return タグの配列
208
+ */
209
+ public searchTags = ( q : string ) => {
210
+ return this . get < SearchTagResult > ( `${ this . url } /api/tags` , { q } ) ;
211
+ }
212
+
204
213
/**
205
214
* 新しくテンプレートを作成します。
206
215
* @param options.body テンプレートの本文
Original file line number Diff line number Diff line change @@ -8,3 +8,10 @@ export interface Tag {
8
8
/** このタグが付けられた投稿の数 */
9
9
items_count : number ;
10
10
}
11
+
12
+ export interface SearchTagResult extends Pick < Tag , 'icon_url' > {
13
+ name : string ;
14
+ url_name : string ;
15
+ follower_count : number ;
16
+ item_count : number ;
17
+ }
You can’t perform that action at this time.
0 commit comments