{"modulePath":"github.com/Defacto2/server","version":"v1.16.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package api\n\n## Constants\n\n```go\nconst (\n\tAPIBase = \"/api/v1\" // API Base URI (any changes need to be reflected in apiinfo.tmpl)\n\tAPIVer  = \"1.0.2\"   // API Version gets shown in the HTTP header replies\n\n)\n```\n\n## Functions\n\n```go\nfunc AreaCodeAPI(c *echo.Context) error\n```\nAreaCodeAPI returns details for a specific area code.\n\n```go\nfunc AreacodeSearchAPI(c *echo.Context) error\n```\nAreacodeSearchAPI searches for area codes or regions by query.\n\n```go\nfunc AreacodesAPI(c *echo.Context) error\n```\nAreacodesAPI returns all North American Numbering Plan (NANP) area codes.\n\n```go\nfunc ArtifactAPIs(sl *slog.Logger, c *echo.Context, db *sql.DB, uri string) error\n```\nArtifactAPIs returns a list of all files filtered by the provided uri string.\n\n```go\nfunc ArtifactsAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nArtifactsAPI returns a list of all files ordered by \"oldest\".\n\n```go\nfunc ArtifactsNewAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nArtifactsNewAPI returns a list of all files ordered by \"new-uploads\".\n\n```go\nfunc ArtistsAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\n\n```go\nfunc BoardsAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nBoardsAPI is the handler for the BBS API endpoint.\n\n```go\nfunc CategoriesAPI(c *echo.Context, db *sql.DB) error\n```\nCategoriesAPI returns all categories.\n\n```go\nfunc CategoryAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nCategoryAPI returns a list of files from any category tag.\n\n```go\nfunc CodersAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\n\n```go\nfunc DemozooAPI(c *echo.Context) error\n```\nDemozooAPI returns a list of all groups with their Demozoo IDs.\n\n```go\nfunc FileAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nFileAPI returns a single file by its obfuscated ID.\n\n```go\nfunc GroupsAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nGroupsAPI returns a list of all releasers/groups with pagination.\n\n```go\nfunc MagazinesAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nMagazinesAPI is the handler for the magazines API endpoint.\n\n```go\nfunc Markup(src string) string\n```\nMarkup removes CSS classes and attributes from HTML for API responses. Keeps semantic HTML tags but removes presentation-specific markup.\n\n```go\nfunc MilestoneDecadeAPI(c *echo.Context) error\n```\nMilestoneDecadeAPI returns milestones for a specific decade.\n\n```go\nfunc MilestoneHighlightsAPI(c *echo.Context) error\n```\nMilestoneHighlightsAPI returns only highlighted milestones.\n\n```go\nfunc MilestoneYearAPI(c *echo.Context) error\n```\nMilestoneYearAPI returns milestones for a specific year.\n\n```go\nfunc MilestoneYearsAPI(c *echo.Context) error\n```\nMilestoneYearsAPI returns milestones within a year range.\n\n```go\nfunc MilestonesAPI(c *echo.Context) error\n```\nMilestonesAPI returns all milestones.\n\n```go\nfunc MusiciansAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\n\n```go\nfunc PlatformAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nPlatformAPI returns a list of files from any platform tag.\n\n```go\nfunc PlatformsAPI(c *echo.Context, db *sql.DB) error\n```\nPlatformsAPI returns all platforms.\n\n```go\nfunc RegionAPI(c *echo.Context) error\n```\nRegionAPI returns a specific region by its abbreviation.\n\n```go\nfunc RegionsAPI(c *echo.Context) error\n```\nRegionsAPI returns all region in the North American Numbering Plan (NANP).\n\n```go\nfunc ReleaserAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nReleaserAPI returns details for a specific releaser or group.\n\n```go\nfunc ScenerAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nScenerAPI returns details for a specific scener.\n\n```go\nfunc ScenersAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nScenersAPI returns a list of Sceners ScenersAPI builds the ReleaserAPI list from model data.\n\n```go\nfunc SitesAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\nSitesAPI is the handler for the FTP sites API endpoint.\n\n```go\nfunc TagAPI(sl *slog.Logger, c *echo.Context, db *sql.DB, name string) error\n```\nTagAPI returns a list of files from any category or platform tag.\n\n```go\nfunc TagsAPI(c *echo.Context, db *sql.DB, category, platform bool) error\n```\nTagsAPI returns artifact tags.\n\n  - Set categories true to return all categories.\n  - Set platform true to return all platforms.\n  - Set both to true to return all category and platform tags.\n\nSetting both to false will return an empty JSON response.\n\n```go\nfunc WebsitesAPI(c *echo.Context) error\n```\nWebsitesAPI returns all websites from the website page.\n\n```go\nfunc WritersAPI(sl *slog.Logger, c *echo.Context, db *sql.DB) error\n```\n\n## Types\n\n```go\ntype ArtifactAPI struct {\n\tSummary       artifactAPI   `json:\"artifact\"`\n\tFileMeta      filemetaAPI   `json:\"download\"`\n\tArtMeta       artmetaAPI    `json:\"meta\"`\n\tRelationships []relationAPI `json:\"relationships\"`\n}\n```\nArtifactAPI represents an artifact file for API responses.\n\n```go\ntype EntityAPI struct {\n\tID       string     `json:\"id\"`\n\tName     string     `json:\"name\"`\n\tTitle    string     `json:\"title\"`\n\tURLs     entityURLs `json:\"urls\"`\n\tStats    totalsAPI  `json:\"statistics\"`\n\tWebsites any        `json:\"websites,omitempty\"`\n\tSixteen  string     `json:\"sixteen,omitempty\"`\n\tJaneway  string     `json:\"janeway,omitempty\"`\n\tDemozoo  string     `json:\"demozoo,omitempty\"`\n\tCsdb     string     `json:\"csdb,omitempty\"`\n}\n```\nEntityAPI represents a group, scener, or releaser for API responses.\n\n```go\nfunc ReleasersAPI(rels model.Releasers) []EntityAPI\n```\nReleasersAPI builds the ReleaserAPI list from model data.\n\n","path":"github.com/Defacto2/server/handler/api","name":"api","synopsis":"","isRedistributable":true}
