Get Courses
Platform API
This endpoint retrieves a list of all available courses from the platform.
curl -X GET "https://andamio-api-308006323670.us-central1.run.app/api/v1/platform/published-courses"
fetch("https://andamio-api-308006323670.us-central1.run.app/api/v1/platform/published-courses")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://andamio-api-308006323670.us-central1.run.app/api/v1/platform/published-courses"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://andamio-api-308006323670.us-central1.run.app/api/v1/platform/published-courses"
response = requests.request("GET", url)
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://andamio-api-308006323670.us-central1.run.app/api/v1/platform/published-courses"))
.GET()
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var response = await client.GetAsync("https://andamio-api-308006323670.us-central1.run.app/api/v1/platform/published-courses");
var responseBody = await response.Content.ReadAsStringAsync();
{
"published_courses": [
{
"category": "Programming",
"course_code": "CS101",
"course_nft_policy_id": "policyid123",
"description": "A beginner-friendly course on Go.",
"image_url": "https://example.com/go.png",
"title": "Introduction to Go Programming",
"video_url": "https://example.com/go_intro.mp4"
}
]
}
{
"details": "string",
"message": "Unauthorized: Invalid or missing credentials.",
"status_code": 401
}
{
"details": "string",
"message": "Forbidden: Insufficient permissions or tier access.",
"status_code": 403
}
{
"details": "string",
"message": "Request Read Timeout: The server did not receive the full request within the allocated time.",
"status_code": 408
}
{
"details": "string",
"message": "Unprocessable Entity: Invalid request structure or data.",
"status_code": 422
}
{
"details": "string",
"message": "Too Many Requests: Rate limit or quota exceeded.",
"status_code": 429
}
{
"details": "string",
"message": "Connection Timeout: The connection timed out due to inactivity or other network issues.",
"status_code": 498
}
{
"details": "string",
"message": "Response Write Timeout: The server failed to send the full response within the allocated time.",
"status_code": 499
}
{
"details": "string",
"message": "Internal Server Error: An unexpected error occurred.",
"status_code": 500
}