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';
88import { Like } from '../entities/Like' ;
99import { Project } from '../entities/Project' ;
1010import { Reaction } from '../entities/Reaction' ;
11- import { Tag } from '../entities/Tag' ;
11+ import { SearchTagResult , Tag } from '../entities/Tag' ;
1212import { Tagging } from '../entities/Tagging' ;
1313import { Team } from '../entities/Team' ;
1414import { TeamInvitation } from '../entities/TeamInvitation' ;
@@ -201,6 +201,15 @@ export class Qiita extends Gateway {
201201 return this . get < Template > ( `${ this . url } ${ this . version } /templates/${ template_id } ` ) ;
202202 }
203203
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+
204213 /**
205214 * 新しくテンプレートを作成します。
206215 * @param options.body テンプレートの本文
Original file line number Diff line number Diff line change @@ -8,3 +8,10 @@ export interface Tag {
88 /** このタグが付けられた投稿の数 */
99 items_count : number ;
1010}
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