<commit_before>FORMAT: 1A
HOST: https://muh.io/

# Muh

Muh api provides a in memory paste service, which immediately
stores your pastes. It is optimized on low latency access.

## Gist

A gist is just the logical layer on top of snippets. 
It could also be called as a SnippetCollection.

## Gist/Snippet handling [/gists]

Creating gists, adding snippets and requesting gists.

### Fetching a Gist [GET /gists/{uuid}]

+ Parameters
    + uuid (string) - Gists unique identifier

+ Response 200 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset
    + Attributes(Gist full)
    + Body

### Create a gist with snippets [POST /gists]

+ Request (application/x-www-form-urlencoded)
    + Attributes(Snippet)
    + Body
        snippets[0]paste=somerubycode&
        snippets[0]lang=ruby&
        snippets[1]paste=moarrubycode&
        snippets[1]lang=ruby
        
+ Response 201 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset
    + Attributes(Gist short)
    + Body

# Data Structures

## Gist short (object)
+ gist: 
  + uuid: `2059d36c-cd5a-4271-8abd-cf184f04db7c` (string, required) - Unique gist identifier.

## Gist full (object)
+ gist: 
  + uuid: `2059d36c-cd5a-4271-8abd-cf184f04db7c` (string, required) - Unique gist identifier.
+ snippets: (array[Snippet]) - A list of snippets

## Snippet (object)
+ paste: `some ruby code` (string, required) - Raw content of paste.
+ lang: `ruby` (string, required) - Which kind of programming language the paste is.<commit_msg>Setting / documenting user constaints.<commit_after>FORMAT: 1A
HOST: https://muh.io/

# Muh

Muh api provides a in memory paste service, which immediately
stores your pastes. It is optimized on low latency access.

## Gist

A gist is just the logical layer on top of snippets. 
It could also be called as a SnippetCollection.

## Gist/Snippet handling [/v1/gists]

Creating gists, adding snippets and requesting gists.

### Fetching a Gist [GET /v1/gists/{uuid}]

+ Parameters
    + uuid (string) - Gists unique identifier

+ Response 200 (application/json)
    + Attributes(Gist full)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset
    + Body

### Create a gist with snippets [POST /v1/gists]

+ Request (application/x-www-form-urlencoded)
    + Attributes(Snippet)
    + Body
        snippets[0]paste=somerubycode&
        snippets[0]lang=ruby&
        snippets[1]paste=moarrubycode&
        snippets[1]lang=ruby
        
+ Response 201 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset
    + Attributes(Gist short)
    + Body

## User/Login handling [/v1/users]

### Get users profile [GET /v1/users/{uuid}/profile]

+ Parameters
    + uuid (string) - Users unique identifier

+ Response 200 (application/json)
    + Attributes(User)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset
    + Body

+ Response 404 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset

### Create user [POST /v1/users]

+ Request (application/json)
    + Attributes(Login)

+ Request (application/x-www-form-urlencoded)
    + Attributes(Login)
    + Body
        username=moo&
        password=<PASSWORD>

+ Response 200 (application/json)
    + Attributes(User)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset
    + Body

+ Response 405 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset

+ Response 400 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset

### Verify user/password combination [POST /v1/users/authorize]

+ Request (application/json)
    + Attributes(Login)

+ Request (application/x-www-form-urlencoded)
    + Attributes(Login)
    + Body
        username=moo&
        password=<PASSWORD>

+ Response 204 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset
    
+ Response 403 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset

+ Response 400 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset

### Reset users uuid [PUT /v1/users/{uuid}/uuid]

+ Parameters
    + uuid (string) - Users unique identifier

+ Response 200 (application/json)
    + Attributes(User)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset
    + Body

+ Response 404 (application/json)
    + Headers
        X-Ratelimit-Hits: Amount of requests until last reset
        X-Ratelimit-Bytes: Amount of traffic (upload/download) until last reset


# Data Structures

## Login (object)
+ username: `moo` (string, required) - Username
+ password: `<PASSWORD>` (string, required) - Password

## User (object)
+ user:
    + uuid: `dab0759-3c0f-43d6-9177-2d718db61b3f` (string) - UserID
    + username: `moo` (string) - Username

## Gist short (object)
+ gist: 
  + uuid: `2059d36c-cd5a-4271-8abd-cf184f04db7c` (string, required) - Unique gist identifier.

## Gist full (object)
+ gist: 
  + uuid: `2059d36c-cd5a-4271-8abd-cf184f04db7c` (string, required) - Unique gist identifier.
+ snippets: (array[Snippet]) - A list of snippets

## Snippet (object)
+ paste: `some ruby code` (string, required) - Raw content of paste.
+ lang: `ruby` (string, required) - Which kind of programming language the paste is.
{'fraction_non_alphanumeric': 0.10107858243451463, 'fraction_numerical': 0.02342064714946071, 'mean_word_length': 3.2040155440414506, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6106730', 'n_tokens_mistral': 2212, 'n_tokens_neox': 2087, 'n_words': 631}