diff --git a/src/clis/stackoverflow/bounties.yaml b/src/clis/stackoverflow/bounties.yaml new file mode 100644 index 0000000..d30fe8d --- /dev/null +++ b/src/clis/stackoverflow/bounties.yaml @@ -0,0 +1,29 @@ +site: stackoverflow +name: bounties +description: Active bounties on Stack Overflow +domain: stackoverflow.com +strategy: public +browser: false + +args: + limit: + type: int + default: 10 + description: Max number of results + +pipeline: + - fetch: + url: https://api.stackexchange.com/2.3/questions/featured?order=desc&sort=activity&site=stackoverflow + + - select: items + + - map: + title: "${{ item.title }}" + bounty: "${{ item.bounty_amount }}" + score: "${{ item.score }}" + answers: "${{ item.answer_count }}" + url: "${{ item.link }}" + + - limit: ${{ args.limit }} + +columns: [bounty, title, score, answers, url] diff --git a/src/clis/stackoverflow/hot.yaml b/src/clis/stackoverflow/hot.yaml new file mode 100644 index 0000000..a4e5d49 --- /dev/null +++ b/src/clis/stackoverflow/hot.yaml @@ -0,0 +1,28 @@ +site: stackoverflow +name: hot +description: Hot Stack Overflow questions +domain: stackoverflow.com +strategy: public +browser: false + +args: + limit: + type: int + default: 10 + description: Max number of results + +pipeline: + - fetch: + url: https://api.stackexchange.com/2.3/questions?order=desc&sort=hot&site=stackoverflow + + - select: items + + - map: + title: "${{ item.title }}" + score: "${{ item.score }}" + answers: "${{ item.answer_count }}" + url: "${{ item.link }}" + + - limit: ${{ args.limit }} + +columns: [title, score, answers, url] diff --git a/src/clis/stackoverflow/search.yaml b/src/clis/stackoverflow/search.yaml new file mode 100644 index 0000000..0eab5a1 --- /dev/null +++ b/src/clis/stackoverflow/search.yaml @@ -0,0 +1,32 @@ +site: stackoverflow +name: search +description: Search Stack Overflow questions +domain: stackoverflow.com +strategy: public +browser: false + +args: + query: + type: string + required: true + description: Search query + limit: + type: int + default: 10 + description: Max number of results + +pipeline: + - fetch: + url: https://api.stackexchange.com/2.3/search/advanced?order=desc&sort=relevance&q=${{ args.query }}&site=stackoverflow + + - select: items + + - map: + title: "${{ item.title }}" + score: "${{ item.score }}" + answers: "${{ item.answer_count }}" + url: "${{ item.link }}" + + - limit: ${{ args.limit }} + +columns: [title, score, answers, url] diff --git a/src/clis/stackoverflow/unanswered.yaml b/src/clis/stackoverflow/unanswered.yaml new file mode 100644 index 0000000..a21266f --- /dev/null +++ b/src/clis/stackoverflow/unanswered.yaml @@ -0,0 +1,28 @@ +site: stackoverflow +name: unanswered +description: Top voted unanswered questions on Stack Overflow +domain: stackoverflow.com +strategy: public +browser: false + +args: + limit: + type: int + default: 10 + description: Max number of results + +pipeline: + - fetch: + url: https://api.stackexchange.com/2.3/questions/unanswered?order=desc&sort=votes&site=stackoverflow + + - select: items + + - map: + title: "${{ item.title }}" + score: "${{ item.score }}" + answers: "${{ item.answer_count }}" + url: "${{ item.link }}" + + - limit: ${{ args.limit }} + +columns: [title, score, answers, url]