snapas
БесплатноБез исполняемых скриптовНе проверенSnap.as API Documentation
Об этом скилле
Snap.as Skill
Comprehensive assistance with Snap.as API development, enabling photo upload and management through the Write.as suite.
When to Use This Skill
This skill should be triggered when:
- Building applications that upload photos to Snap.as
- Implementing Snap.as photo management features
- Working with Write.as authentication for photo services
- Debugging Snap.as API requests and responses
- Developing photo gallery features using Snap.as
- Managing organizational photo uploads
- Integrating photo sharing into Write.as applications
Quick Reference
Authentication
All Snap.as API requests require a Write.as user access token in the Authorization header:
Authorization: Token 00000000-0000-0000-0000-000000000000
Upload Photo to Personal Account
curl https://snap.as/api/photos/upload \
-H "Authorization: Token YOUR_ACCESS_TOKEN" \
-F "file=@/path/to/photo.jpg"
Response (201 Created):
{
"code": 201,
"data": {
"id": "abc123",
"filename": "photo.jpg",
"size": 245760,
"url": "https://i.snap.as/abc123.jpg"
}
}
Retrieve User Photos
curl -X POST https://snap.as/api/me/photos \
-H "Authorization: Token YOUR_ACCESS_TOKEN"
Response (200 OK):
{
"code": 200,
"data": [
{
"id": "abc123",
"filename": "photo.jpg",
"size": 245760,
"url": "https://i.snap.as/abc123.jpg"
}
]
}
Delete Photo
curl -X POST https://snap.as/api/photos/abc123 \
-H "Authorization: Token YOUR_ACCESS_TOKEN"
Response (200 OK):
{
"code": 200,
"data": {}
}
Upload Photo to Organization
curl https://snap.as/api/organizations/myorg/photos/upload \
-H "Authorization: Token YOUR_ACCESS_TOKEN" \
-F "file=@/path/to/photo.jpg"
Response (201 Created):
{
"code": 201,
"data": {
"id": "xyz789",
"filename": "photo.jpg",
"size": 245760,
"url": "https://i.snap.as/xyz789.jpg"
}
}
Error Response Format
{
"code": 401,
"error_msg": "Invalid access token"
}
Go Client Library Usage
import "github.com/snapas/go-snapas"
// Initialize client
client := snapas.NewClient("YOUR_ACCESS_TOKEN")
// Upload photo
photo, err := client.UploadPhoto("/path/to/photo.jpg")
if err != nil {
log.Fatal(err)
}
fmt.Printf("Photo URL: %s\n", photo.URL)
Key Concepts
Authentication
Snap.as uses Write.as user access tokens for authentication. These tokens must be obtained by logging into Write.as and retrieving the user's access credentials. Include the token in the Authorization header of every API request.
Base URL
All API requests are made to https://snap.as with specific endpoint paths appended.
Photo Objects
Photo objects returned by the API contain:
id: Unique identifier for the photofilename: Original filename of the uploaded photosize: File size in bytesurl: Public URL where the photo can be accessed
Response Format
All successful API responses follow a consistent structure:
{
"code": <HTTP_STATUS_CODE>,
"data": <RESPONSE_DATA>
}
Failed requests return:
{
"code": <HTTP_STATUS_CODE>,
"error_msg": "<ERROR_MESSAGE>"
}
HTTP Status Codes
200 OK: Request succeeded201 Created: Resource created successfully400 Bad Request: Invalid request parameters401 Unauthorized: Invalid or missing access token403 Forbidden: Access denied to resource404 Not Found: Resource does not exist429 Too Many Requests: Rate limit exceeded
Personal vs. Organization Photos
- Personal photos: Uploaded to the user's account using
/api/photos/upload - Organization photos: Uploaded to a specific organization using
/api/organizations/{alias}/photos/upload
Reference Files
This skill includes comprehensive documentation in references/:
- api.md - Complete API reference with all endpoints, authentication details, request/response formats, and error handling
Use view to read the API reference file when detailed information is needed about specific endpoints or response formats.
Working with This Skill
For Beginners
Start by understanding the authentication mechanism. You'll need a Write.as user access token before making any API requests. Test with simple photo uploads to your personal account before working with organizational features.
For Integration Developers
Focus on the personal photo upload and retrieval endpoints first. Implement proper error handling for common scenarios like authentication failures (401), rate limiting (429), and invalid requests (400).
For Organization Features
Once comfortable with personal uploads, explore organizational photo management. Organizations require the organization alias in the endpoint URL and appropriate access permissions.
For Go Developers
Use the official go-snapas client library available at `github.com/snapas/go-
Установить snapas в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл snapas?
Snap.as API Documentation
Как установить скилл snapas?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл snapas запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic