Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodionlim/carousell
Carousell provides primitives for querying Carousell (Singapore). It keeps users updated on new listings, allowing faster reverting than if they were to do it manually
https://github.com/rodionlim/carousell
carousell cli go golang singapore slack
Last synced: 14 days ago
JSON representation
Carousell provides primitives for querying Carousell (Singapore). It keeps users updated on new listings, allowing faster reverting than if they were to do it manually
- Host: GitHub
- URL: https://github.com/rodionlim/carousell
- Owner: rodionlim
- License: apache-2.0
- Created: 2022-02-18T09:53:26.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2022-09-06T08:27:46.000Z (over 2 years ago)
- Last Synced: 2024-06-20T03:40:54.194Z (7 months ago)
- Topics: carousell, cli, go, golang, singapore, slack
- Language: Go
- Homepage:
- Size: 24.1 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Overview
Carousell is both a library and CLI tool written in Golang that fetches Carousell listings and notifies users.
# Installation
Using Carousell is easy. First, use `go install` to install the latest version of the executable. This command will install the `carousell` executable in `$GOPATH/bin`:
```
go install github.com/rodionlim/carousell@latest
```To use the library, `go get` will install the libraries and dependencies for your project.
```
go get github.com/rodionlim/carousell
```Later, to receive updates, run
```
go get -u github.com/rodionlim/carousell
```# Executable Usage
There are two commands, `get` and `notify`. Flags can be used to modify the search behaviour, e.g. `-r` flag will query for only recent listings, `-v` flag represents verbose mode and add logging to the output
`get` will fetch the listings and output them to the console.
```
carousell get "nintendo switch" -r
````notify` will periodically fetch the listings, and notify users on new listings in Slack. For slack to work, the environment variable `SLACK_ACCESS_TOKEN` has to be set and the appropriate permissions granted, e.g. inviting the application to the slack channel
```
carousell notify --slack-channel=CHANNEL_ID "nintendo switch" -r
```To get help on the available flags, use the `-h` flag.
```
carousell -h
```# Quick Start
The following Go code generates the latest 20 listing based on key words specified
```
r := carousell.NewReq(crs.WithSearch("nintendo switch"))
r.Get()
```# License
Carousell is released under the Apache 2.0 license. See [LICENSE](https://github.com/rodionlim/carousell/blob/master/LICENSE.txt)