Browse Source

still why but with a readme

main
gryffyn 4 months ago
parent
commit
5e94ee61b4
Signed by: gryffyn GPG Key ID: 6948DD6514D02BEF
  1. 27
      LICENSE
  2. 59
      README.md
  3. 5
      main.go

27
LICENSE

@ -0,0 +1,27 @@
Copyright (c) 2021 gryffyn
Permission is hereby granted, free of charge, to any person or
organization (the "User") obtaining a copy of this software and
associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
1. The above copyright notice and this permission notice shall be
included in all copies of the Software.
2. A form of modifiable source material for the Software,
including but not limited to software source code,
configuration files, and documentation code must be available
and must retain this license.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT EXPRESS OR IMPLIED WARRANTY OF
ANY KIND, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

59
README.md

@ -0,0 +1,59 @@
# Helpful Weather Advisor
This Very Helpful application takes in a zip code and a country, and then returns a JSON response telling you what clothes to wear.
why? because.
## Installing
1. `go get git.neveris.one/gryffyn/helpfulweatheradvisor`
2. question what led you to this point
3. ???
4. profit
## Usage
### Running the server
```
❯ helpfulweatheradvisor -h
NAME:
helpfulweatheradvisor - A new cli application
USAGE:
helpfulweatheradvisor [global options] command [command options] [arguments...]
VERSION:
v0.1.0
DESCRIPTION:
a very helpful weather advisor. tells you what to wear for any weather.
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--port value, -p value Port to bind to, by default 8585 (default: 0)
--location value, -l value subdirectory to run in (including forward slash - for example '/weather')
--help, -h show help (default: false)
--version, -v print the version (default: false)
```
## API reference
takes the parameters `country` and `postcode`.
Example usage = `https://127.0.0.1:8585/?country=US&postcode=99723`
Returns a JSON response -
```json
{
"country": "",
"postcode": "",
"suggested_clothing": ""
}
```
## License
See LICENSE file for details.

5
main.go

@ -16,8 +16,9 @@ func Run() {
var location string
var port int
app := &cli.App{
Name: "exren",
Version: "v0.1.3",
Name: "helpfulweatheradvisor",
Version: "v0.1.0",
Description: "a very helpful weather advisor. tells you what to wear for any weather.",
Flags: []cli.Flag{
&cli.IntFlag{
Name: "port",

Loading…
Cancel
Save