Skip to content

Add Grapeminds Wine API example repository with multi-language quickstarts#1

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/create-example-repository-wine-api
Draft

Add Grapeminds Wine API example repository with multi-language quickstarts#1
Copilot wants to merge 2 commits into
mainfrom
copilot/create-example-repository-wine-api

Conversation

Copilot AI commented Mar 6, 2026

Copy link
Copy Markdown

Bootstrap a developer-facing example repo for the Grapeminds Wine API (https://grapeminds.eu/api/public/v1), covering all four public endpoints across four languages.

Structure

examples/
├── curl/examples.sh
├── node/examples.js      # Node 18+ built-in fetch
├── python/examples.py    # requests library
└── php/examples.php      # file_get_contents

Changes

README.md

  • Full introduction to the API, base URL, endpoint reference table, per-language run instructions

examples/curl/examples.sh

  • curl -s calls for /ping, /wines, /regions, /grapes

examples/node/examples.js

  • Async fetch wrapper with response.ok guard before JSON parsing

examples/python/examples.py

  • requests.get + raise_for_status() for each endpoint

examples/php/examples.php

  • file_get_contents with === false failure check + RuntimeException before json_decode

Example

// Node.js
const BASE_URL = "https://grapeminds.eu/api/public/v1";

async function get(endpoint) {
  const response = await fetch(`${BASE_URL}${endpoint}`);
  if (!response.ok) throw new Error(`HTTP error ${response.status} for ${endpoint}`);
  return response.json();
}
Original prompt

Create a developer-friendly example repository for the Grapeminds Wine API.

The repository should demonstrate how to use the Grapeminds API with simple code examples in multiple programming languages. The goal is to help developers quickly understand how to integrate the API into their applications.

Requirements:

Create a clear README explaining what the Grapeminds Wine API is and how developers can use it.

Include example requests for the following endpoints:

GET /ping

GET /wines

GET /regions

GET /grapes

Provide example code in the following languages:

curl

JavaScript (Node.js using fetch or axios)

Python (requests)

PHP

Each example should demonstrate how to send a request and print the response.

Use the base URL: https://grapeminds.eu/api/public/v1

Keep the examples simple and easy to copy and run.

Structure the repository like this:

examples/
curl/
node/
python/
php/

Each folder should contain a small script that demonstrates how to call the API.

The README should also include:

a short introduction to the Grapeminds API

the base URL

example requests

instructions on how to run the examples.

Focus on simplicity and clarity so developers can get started with the API in a few minutes.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add example repository for Grapeminds Wine API Add Grapeminds Wine API example repository with multi-language quickstarts Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants