diff --git a/source/index.html.md b/source/index.html.md index ab35a15..65c678c 100644 --- a/source/index.html.md +++ b/source/index.html.md @@ -302,6 +302,10 @@ Seems like update to code via these diagrams would be a manual process, and be h npx embedme ./source/index.html.md ``` +# GoCli + +@todo #41:60mins Create a go cli tool that generates golang documentation via godocs. To make goslate be more useful I think it is important to figure out how to create a cli tool with go that generates documentation so that I can see if it really is a game changer, or if it will just be a different way to do the same thing I already do. + # GoSlate @todo #41:30mins Create goslate example code @@ -323,9 +327,6 @@ go-slate assumes the following source tree: ├── main.go └── apidoc - - - @todo #41:30mins document how to run goslate locally @todo #41:30mins publish goslate docs to github pages @@ -333,35 +334,3 @@ go-slate assumes the following source tree: @todo #41:30mins Create github action to publish goslate docs to github pages @todo #41:15mins update the pre-commit hook to use goslate commands instead of ruby slate. - -There are a couple things that run locally to help with development of this repo. - -## Up to date scripts with embedme - -## Quick, Small iterative issues with PDD - -PDD is a style of development that breaks tasks down into small puzzles that can be created, at a high level then get the most basic lazy implementation added, leaving behind smaller todos called puzzles to finish the rest of the implementation. - -Puzzles can be added using tags, and running pdd locally will help debug if your puzzle tags are not correct. - -```sh -# ../scripts/install-pdd.sh - -gem install pdd -# Adding ruby gems to the path if it doesn't exist already -if ! echo "$PATH" | grep --quiet "/usr/local/lib/ruby/gems/2.7.0/bin"; then - echo "No ruby in path" - if ! grep --quiet "/usr/local/lib/ruby/gems/2.7.0/bin" ~/.bash_profile; then - echo "Adding ruby gems to profile" - echo export PATH='"/usr/local/lib/ruby/gems/2.7.0/bin:$PATH"' >> ~/.bash_profile - echo 'pdd has been installed and added to your path. Either restart your terminal or enter the command `source ~/.bash_profile`' - echo 'then you can use `pdd` to see what the output of pdd will be when pushed to the server' - fi -fi -``` - -will install pdd locally which can then be run in terminal with - -```sh -pdd -``` \ No newline at end of file diff --git a/src/service/apidoc/includes/_errors.md b/src/service/apidoc/includes/_errors.md deleted file mode 100644 index 7b35e92..0000000 --- a/src/service/apidoc/includes/_errors.md +++ /dev/null @@ -1,22 +0,0 @@ -# Errors - - - -The Kittn API uses the following error codes: - - -Error Code | Meaning ----------- | ------- -400 | Bad Request -- Your request is invalid. -401 | Unauthorized -- Your API key is wrong. -403 | Forbidden -- The kitten requested is hidden for administrators only. -404 | Not Found -- The specified kitten could not be found. -405 | Method Not Allowed -- You tried to access a kitten with an invalid method. -406 | Not Acceptable -- You requested a format that isn't json. -410 | Gone -- The kitten requested has been removed from our servers. -418 | I'm a teapot. -429 | Too Many Requests -- You're requesting too many kittens! Slow down! -500 | Internal Server Error -- We had a problem with our server. Try again later. -503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. diff --git a/src/service/apidoc/index.html.md b/src/service/apidoc/index.html.md deleted file mode 100644 index e101e66..0000000 --- a/src/service/apidoc/index.html.md +++ /dev/null @@ -1,239 +0,0 @@ ---- -title: API Reference - -language_tabs: # must be one of https://git.io/vQNgJ - - shell - - ruby - - python - - javascript - -toc_footers: - - Sign Up for a Developer Key - - Documentation Powered by Slate - -includes: - - errors - -search: true ---- - -# Introduction - -Welcome to the Kittn API! You can use our API to access Kittn API endpoints, which can get information on various cats, kittens, and breeds in our database. - -We have language bindings in Shell, Ruby, Python, and JavaScript! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right. - -This example API documentation page was created with [Slate](https://github.com/lord/slate). Feel free to edit it and use it as a base for your own API's documentation. - -# Authentication - -> To authorize, use this code: - -```ruby -require 'kittn' - -api = Kittn::APIClient.authorize!('meowmeowmeow') -``` - -```python -import kittn - -api = kittn.authorize('meowmeowmeow') -``` - -```shell -# With shell, you can just pass the correct header with each request -curl "api_endpoint_here" - -H "Authorization: meowmeowmeow" -``` - -```javascript -const kittn = require('kittn'); - -let api = kittn.authorize('meowmeowmeow'); -``` - -> Make sure to replace `meowmeowmeow` with your API key. - -Kittn uses API keys to allow access to the API. You can register a new Kittn API key at our [developer portal](http://example.com/developers). - -Kittn expects for the API key to be included in all API requests to the server in a header that looks like the following: - -`Authorization: meowmeowmeow` - - - -# Kittens - -## Get All Kittens - -```ruby -require 'kittn' - -api = Kittn::APIClient.authorize!('meowmeowmeow') -api.kittens.get -``` - -```python -import kittn - -api = kittn.authorize('meowmeowmeow') -api.kittens.get() -``` - -```shell -curl "http://example.com/api/kittens" - -H "Authorization: meowmeowmeow" -``` - -```javascript -const kittn = require('kittn'); - -let api = kittn.authorize('meowmeowmeow'); -let kittens = api.kittens.get(); -``` - -> The above command returns JSON structured like this: - -```json -[ - { - "id": 1, - "name": "Fluffums", - "breed": "calico", - "fluffiness": 6, - "cuteness": 7 - }, - { - "id": 2, - "name": "Max", - "breed": "unknown", - "fluffiness": 5, - "cuteness": 10 - } -] -``` - -This endpoint retrieves all kittens. - -### HTTP Request - -`GET http://example.com/api/kittens` - -### Query Parameters - -Parameter | Default | Description ---------- | ------- | ----------- -include_cats | false | If set to true, the result will also include cats. -available | true | If set to false, the result will include kittens that have already been adopted. - - - -## Get a Specific Kitten - -```ruby -require 'kittn' - -api = Kittn::APIClient.authorize!('meowmeowmeow') -api.kittens.get(2) -``` - -```python -import kittn - -api = kittn.authorize('meowmeowmeow') -api.kittens.get(2) -``` - -```shell -curl "http://example.com/api/kittens/2" - -H "Authorization: meowmeowmeow" -``` - -```javascript -const kittn = require('kittn'); - -let api = kittn.authorize('meowmeowmeow'); -let max = api.kittens.get(2); -``` - -> The above command returns JSON structured like this: - -```json -{ - "id": 2, - "name": "Max", - "breed": "unknown", - "fluffiness": 5, - "cuteness": 10 -} -``` - -This endpoint retrieves a specific kitten. - - - -### HTTP Request - -`GET http://example.com/kittens/` - -### URL Parameters - -Parameter | Description ---------- | ----------- -ID | The ID of the kitten to retrieve - -## Delete a Specific Kitten - -```ruby -require 'kittn' - -api = Kittn::APIClient.authorize!('meowmeowmeow') -api.kittens.delete(2) -``` - -```python -import kittn - -api = kittn.authorize('meowmeowmeow') -api.kittens.delete(2) -``` - -```shell -curl "http://example.com/api/kittens/2" - -X DELETE - -H "Authorization: meowmeowmeow" -``` - -```javascript -const kittn = require('kittn'); - -let api = kittn.authorize('meowmeowmeow'); -let max = api.kittens.delete(2); -``` - -> The above command returns JSON structured like this: - -```json -{ - "id": 2, - "deleted" : ":(" -} -``` - -This endpoint deletes a specific kitten. - -### HTTP Request - -`DELETE http://example.com/kittens/` - -### URL Parameters - -Parameter | Description ---------- | ----------- -ID | The ID of the kitten to delete - diff --git a/src/service/main.go b/src/service/main.go deleted file mode 100644 index d6e0156..0000000 --- a/src/service/main.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - println("hi") -}