• Stars
    star
    100
  • Rank 332,806 (Top 7 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 2 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Web API about ๐Ÿœ

Ramen API ๐Ÿœ

Ramen API is a free Web API about ๐Ÿœ. This API is designed for the purpose of testing a software application which is accessing Web APIs. For example, you can use Ramen API for prototyping your React, Vue, or Angular web pages.

You can try Ramen API with this code.

fetch('https://ramen-api.dev/shops/yoshimuraya')
  .then((res) => res.json())
  .then((json) => console.log(json.shop.name)) // => ๅ‰ๆ‘ๅฎถ

This repository manages the source code and the content including photos.

You might want to say why Ramen? And, I will say. ๐Ÿœ is super delicious!! ๐Ÿ˜‹

Features

  • ๐ŸŒŸ Support REST API and GraphQL.
  • ๐Ÿ–ผ๏ธ We can get an information of Ramen shops and their rich photos.
  • ๐Ÿ†“ Completely free.
  • ๐Ÿง‘โ€๐Ÿ’ป You can contribute by adding Ramen content.

Information

  • Currently, Ramen API is a beta version. There's a possibility that API may be changed.
  • You should show the credit like "powered by Ramen API" on your page and link to this GitHub repository.
  • The information of Ramen shops and photos are distributed under the Creative Commons copyright license CC/BY.
  • If you want to use photos in your application publicly, you should show the author id or name of the photos as the credit.
  • Authentication is not required.
  • There is no rate-limitation.

Base URL

https://ramen-api.dev

TypeScript Types

type Photo = {
  name: string
  url: string
  width: number
  height: number
  authorId?: string
  author?: Author
}

type Shop = {
  id: string
  name?: string
  photos?: Photo[]
}

type Author = {
  id: string
  name: string
  url: string
}

REST API

SS

Global parameters

  • pretty - Flag of JSON pretty printing.

GET /shops

Parameters

  • page - default is 1.
  • perPage - default is 10. Maximum value is 100.

Examples

GET /shops?pretty&page=1&perPage=3
{
  "shops": [
    {
      "id": "yoshimuraya",
      "name": "ๅ‰ๆ‘ๅฎถ",
      "photos": [
        {
          "name": "yoshimuraya-001.jpg",
          "width": 1200,
          "height": 900,
          "authorId": "yusukebe",
          "url": "https://ramen-api.dev/images/yoshimuraya/yoshimuraya-001.jpg"
        }
      ]
    },
    {
      "id": "sugitaya",
      "name": "ๆ‰็”ฐๅฎถ",
      "photos": [
        {
          "name": "sugitaya-001.jpg",
          "width": 1200,
          "height": 900,
          "authorId": "yusukebe",
          "url": "https://ramen-api.dev/images/sugitaya/sugitaya-001.jpg"
        }
      ]
    },
    {
      "id": "takasagoya",
      "name": "ใŸใ‹ใ•ใ”ๅฎถ",
      "photos": [
        {
          "name": "takasagoya-001.jpg",
          "width": 1200,
          "height": 900,
          "authorId": "yusukebe",
          "url": "https://ramen-api.dev/images/takasagoya/takasagoya-001.jpg"
        }
      ]
    }
  ],
  "totalCount": 7,
  "pageInfo": {
    "nextPage": 2,
    "prevPage": null,
    "lastPage": 3,
    "perPage": 3,
    "currentPage": 1
  }
}

GET /shops/{shopId}

Examples

GET /shops/yoshimuraya
{
  "shop": {
    "id": "yoshimuraya",
    "name": "ๅ‰ๆ‘ๅฎถ",
    "photos": [
      {
        "name": "yoshimuraya-001.jpg",
        "width": 1200,
        "height": 900,
        "author": "yusukebe",
        "url": "https://ramen-api.dev/images/yoshimuraya/yoshimuraya-001.jpg"
      }
    ]
  }
}

GET /authors/{authorId}

Examples

GET /authors/yusukebe
{
  "author": {
    "id": "yusukebe",
    "name": "Yusuke Wada",
    "url": "https://github.com/yusukebe"
  }
}

Errors

Not Found

HTTP Status code is 404.

Sample response:

{
  "errors": [
    {
      "message": "The requested Ramen Shop 'foo' is not found"
    }
  ]
}

GraphQL

Ramen API supports a GraphQL.

SS

Endpoint

https://ramen-api.dev/graphql

Schemas

Shop

type Shop {
  id: String
  name: String
  photos: [Photo]
}

Photo

type Photo {
  name: String
  url: String
  width: Int
  height: Int
  authorId: String
}

Author

type Author {
  id: String
  name: String
  url: String
}

Queries

shop

query {
  shop(id: "yoshimuraya") {
    id
    name
    photos {
      name
      width
      height
      url
      authorId
    }
  }
}

shops

query {
  shops(first: 1, after: "eW9zaGltdXJheWE=") {
    edges {
      node {
        id
        name
      }
      cursor
    }
    pageInfo {
      startCursor
      endCursor
      hasNextPage
      hasPreviousPage
    }
  }
}

Or you can set last and before args.

query {
  shops(last: 1, before: "eW9zaGltdXJheWE=") {
    pageInfo {
      startCursor
      endCursor
      hasNextPage
      hasPreviousPage
    }
  }
}

author

query {
  author(id: "yusukebe") {
    id
    name
    url
  }
}

Contribution

You can contribute by adding Ramen content to this project. Not only by writing code.

Adding a new shop

1. Fork & clone

Fork this repository and clone it.

2. Edit the author information

If this is first time, you should write about you.

mkdir ./content/authors/{authorId}
touch ./content/authors/{authorId}/info.json

Edit ./content/authors/{authorId}/info.json like this:

{
  "id": "yusukebe", // <-- must be /^[0-9a-zA-Z\-\_]+$/
  "name": "Yusuke Wada",
  "url": "https://github.com/yusukebe" // <-- must be /^https:\/\/.+$/
}

3. Edit about the Ramen shop

Write the information of the Ramen shop which you want to add.

mkdir ./content/shops/{shopId}
touch ./content/shops/{shopId}/info.json

Edit ./content/shops/{shopId}/info.json like this:

{
  "id": "yoshimuraya", // <-- must be /^[0-9a-z\-]+$/
  "name": "ๅ‰ๆ‘ๅฎถ",
  "photos": [
    {
      "name": "yoshimuraya-001.jpg", // <-- must be /^[0-9a-z\-\.]+\.(jpg|jpeg|png|gif)$/
      "width": 1200, // <-- must be number
      "height": 900, // <-- must be number
      "authorId": "yusukebe" // <-- must be /^[0-9a-zA-Z\-\_]+$/
    }
  ]
}

4. Add Photo

Add your Ramen photos to an appropriate path such as ./content/shops/{shopId}/{photoName}.

cp IMG_001.JPG ./content/shops/{shopId}/{photoName}

5. Add shopId to shops.json

At the end, edit ./content/shops.json to add the shop id at the last line.

{
  "shopIds": [
    "yoshimuraya",
    "sugitaya",
    "takasagoya",
    "jyoujyouya",
    "torakichiya",
    "rasuta",
    "new-shop-id" // <--- add the id at the last line
  ]
}

6. Pull Request

Create Pull Request to this repository.

Notices

Tips

Resize & Optimize photos

Resize:

sips -Z 800 yoshimuraya-001.jpg

Get the image size:

sips -g pixelHeight -g pixelWidth yoshimuraya-001.jpg

Remove Exif and optimize the image:

jpegtran -copy none -optimize -outfile yoshimuraya-001.jpg yoshimuraya-001.jpg

Projects using Ramen API

Author

Yusuke Wada https://github.com/yusukebe

โค๏ธ ๐Ÿœ

License

Application source code is distributed under the MIT license.

Ramen resources including the photos are distributed under the Creative Commons copyright license CC/BY.

More Repositories

1

gh-markdown-preview

GitHub CLI extension to preview Markdown looks like GitHub.
Go
362
star
2

revealgo

Markdown driven presentation tool written in Go!
Go
230
star
3

r2-image-worker

Store and Deliver images with R2 backend Cloudflare Workers.
TypeScript
160
star
4

hono-htmx

Hono+htmx stack
TypeScript
150
star
5

url-shortener

Creating URL Shortener with Cloudflare Pages
TypeScript
134
star
6

pico

Ultra-tiny router for Cloudflare Workers and Deno
TypeScript
133
star
7

hono-and-remix-on-vite

TypeScript
93
star
8

top-github-users-only-japan

ใ€ŒTop GitHub Usersใ€ใŸใ ใ—ๆ—ฅๆœฌใซ้™ใ‚‹
62
star
9

rj

CLI for printing HTTP Response as JSON.
Go
46
star
10

minidon

Minimal implementation of ActivityPub using Cloudflare Workers and D1
TypeScript
42
star
11

hono-spa-react

TypeScript
41
star
12

chatgpt-streaming

TypeScript
40
star
13

sonik

[WIP] Supersonik web framework for the Edges.
TypeScript
40
star
14

App-revealup

HTTP Server app for viewing Markdown formatted text as slides
Perl
38
star
15

t

t is a command line tool for testing on your terminal.
Go
33
star
16

honox-examples

HonoX examples
TypeScript
31
star
17

cloudflare-d1-drizzle-honox-starter

cloudflare-d1-drizzle-honox-starter
TypeScript
31
star
18

my-first-workers-ai

TypeScript
30
star
19

go-pngquant

Golang wrapper of pngquant / PNG compressor
Go
29
star
20

service-worker-magic

Server and Browser code are really the same. It's magic.
JavaScript
28
star
21

sonik-blog

TypeScript
27
star
22

hono-examples

My Hono examples
TypeScript
27
star
23

Yomico

Yet Another Markdown Viewer
CSS
25
star
24

marks

Bookmarks App with Cloudflare Workers.
TypeScript
23
star
25

Noe

true tears on web application framework.
Perl
21
star
26

hono-with-vercel-ai

An example for using Vercel AI SDK with Hono
TypeScript
21
star
27

hello-d1

My first Cloudflare D1 app
TypeScript
20
star
28

remix-on-hono

Remix on Hono
TypeScript
20
star
29

Hitagi

Shall we talk about stars and micro web application frameworks.
Perl
20
star
30

slack-deno-karma

Example for new Slack platform with Deno
TypeScript
19
star
31

h-web-router

H - Ultra-small Web Router built with Hono's Pattern Router
TypeScript
18
star
32

hono-with-qwik

TypeScript
18
star
33

r2-blog

Experimental blogging system using Cloudflare R2
TypeScript
18
star
34

vite-plugin-wrangler-dev

[WIP] Vite with Wrangler
TypeScript
17
star
35

cloudflare-pages-step-by-step

Create a full-stack application on Cloudflare Pages step-by-step.
TypeScript
17
star
36

file-base-routing-framework

TypeScript
14
star
37

Acme-Porn-JP

Porn terms in Japan.
Perl
13
star
38

cf-s3-uploader

Cloudflare Worker for uploading images to Amazon S3
TypeScript
13
star
39

Kutter

A Web Application displays the tweets about everyone eating. It's sample of Catalyst, DBIx::Class, and Moose.
Perl
13
star
40

hono-jsx-server-components-simple

TypeScript
13
star
41

hono-playground

HTML
12
star
42

slack-zenra-bot

An example for "new Slack platform" with Deno.
TypeScript
12
star
43

mirror

mirror is command line tool for mirroring a web page.
Go
12
star
44

Shiori

Yet another Perl implementation of Shiori web-app.
Perl
11
star
45

signed-request-middleware

SignedRequest Middleware for Hono
TypeScript
11
star
46

Dropdown

Display Markdown on Dropbox as cool HTML.
Perl
10
star
47

TailF

Web Application like a "tail -f xxx" command for Twitter etc.
Perl
10
star
48

xc

Express-like HTTP Client
TypeScript
10
star
49

my-first-js-rpc

My first JS RPC for Cloudflare Workers
TypeScript
10
star
50

Podder

Cool and Easy standalone viewer of Perl codes, Pods, and Inao style Texts in local directory.
CSS
9
star
51

web-framework-bench

For web frameworks on Node, on Deno, and on Bun.
TypeScript
9
star
52

hono-jsx-spa

TypeScript
9
star
53

sushi-ramen-to

https://๐Ÿฃ๐Ÿœ.to
TypeScript
8
star
54

async-local-storage-middleware

TypeScript
8
star
55

dynamic-content-storing

Dynamic Content Storing
TypeScript
7
star
56

miyagawanize

Any Perl Mongers can be like Miyagawa-San with a "Purple Thing" !
Perl
7
star
57

Haartraining-App

Plack Application For Creating Positive/Negative Collection Files of Haartraning OpenCV.
JavaScript
7
star
58

workerd-minimal

Really minimal project for "workerd"
TypeScript
7
star
59

App-mookview

View Markdown texts as a "Mook-Book"
CSS
7
star
60

hono-vite-pages-template

TypeScript
7
star
61

get-platform-proxy-cloudflare-ai

TypeScript
7
star
62

Acme-Zenra

zenrize Japanese sentence.
Perl
7
star
63

preact-ssr

Preact SSR on Cloudflare Workers
TypeScript
7
star
64

WWW-Veoh-Download

WWW::Veoh::Download is module to get and download mp4 files for iPod etc. from Veoh Video Network.
Perl
7
star
65

Nagare

IRC Proxy using HTTP Streaming with Tatsumaki
JavaScript
7
star
66

iekei-workers

ๅฎถ็ณปใƒฉใƒผใƒกใƒณ้ฃŸในใŸใ„๏ผ
TypeScript
6
star
67

ListPod-App-Lite

Convert YouTube Playlist to Podcast feed. It is branche of listpod.tv.
Perl
6
star
68

Plagger-Plugin-Notify-XMPP-AnyEvent

Yet Another XMPP Notify Plagger Plugin using AnyEvent::*
Perl
6
star
69

karma-bot

Slack Bot with Cloudflare Workers. Itโ€™s about Karma.
TypeScript
6
star
70

hono-hybrid-build

TypeScript
6
star
71

hono-with-preact

TypeScript
6
star
72

my-first-constellation

TypeScript
6
star
73

yusu.ke

My website
TypeScript
6
star
74

remix-on-nextjs

Remix runs on Next.js Edge API Routes
TypeScript
6
star
75

hono-ssg-example

TypeScript
6
star
76

js-rpc-examples

TypeScript
6
star
77

hono-htmx-websockets

Hono+HTMX+WebSockets
TypeScript
6
star
78

Daramen

ใƒฉใƒผใƒกใƒณ็”ปๅƒใ‚’ใฒใŸใ™ใ‚‰ใƒ€ใƒฉใƒ€ใƒฉ่ฆ‹ใ‚‹Webใ‚ขใƒ—ใƒช
CSS
5
star
79

plainrouter

Fast and simple routing engine for Ruby
Ruby
5
star
80

miniflare-get-bindings-examples

TypeScript
5
star
81

cloudflare-workshop-examples

[WIP] Cloudflare Workers + Hono Workshop
TypeScript
5
star
82

cloudflare-workshop

MDX
5
star
83

chat-gpt-todos

Creating ChatGPT plugin with Zod OpenAPI Hono
TypeScript
5
star
84

FMTube

Listen and watch YouTube videos with recommendations from Last.fm
CSS
5
star
85

Rumi

Yet Anothor Girl, just web application framework.
Perl
5
star
86

PerlTamago

Perlๅˆๅฟƒ่€…ๅ‘ใ‘ใฎใ”ใใ”ใใ‚ทใƒณใƒ—ใƒซใชใ‚ตใƒณใƒ—ใƒซใ‚นใ‚ฏใƒชใƒ—ใƒˆ้›†
5
star
87

fastly-compute-slack-command

Slack echo command example for Fastly Compute@Edge.
JavaScript
5
star
88

WebService-Simple

Simple Interface To Web Services APIs
Perl
5
star
89

BigConcept

A Big Concept for Next Society. This is just POC.
5
star
90

hono-jsx-dom-with-vite

TypeScript
5
star
91

testing-d1-app-with-types

Testing a D1 Application with Types
TypeScript
5
star
92

Aoi

Web App for sharing, stocking, and finding our plain/markdown texts
CSS
4
star
93

Nopaste

Nopaste application making with Mojolicious.
CSS
4
star
94

Twitter-Ikamusume

ใ‚คใ‚ซๅจ˜ใ‚ฟใ‚คใƒ ใƒฉใ‚คใƒณ็š„ใชไฝ•ใ‹
Perl
4
star
95

miyagawanize2

about purple thing
Perl
4
star
96

Shodo

Auto-generate documents from HTTP::Request and HTTP::Response
Perl
4
star
97

my-first-chatgpt-plugin

TypeScript
4
star
98

hono-jsx-todos

TypeScript
4
star
99

vercel-zod-openapi

TypeScript
4
star
100

WebService-Simple-AWS

Simple Interface to Amazon Web Service using WebService::Simple
Perl
3
star