{"id":24552000,"url":"https://github.com/mlabs-haskell/nft-marketplace-server","last_synced_at":"2026-03-01T20:32:09.249Z","repository":{"id":37753561,"uuid":"427091186","full_name":"mlabs-haskell/nft-marketplace-server","owner":"mlabs-haskell","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-05T16:05:13.000Z","size":2244,"stargazers_count":2,"open_issues_count":13,"forks_count":2,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-15T22:42:28.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlabs-haskell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-11T17:44:41.000Z","updated_at":"2022-07-23T07:17:24.000Z","dependencies_parsed_at":"2023-02-04T06:46:15.806Z","dependency_job_id":null,"html_url":"https://github.com/mlabs-haskell/nft-marketplace-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mlabs-haskell/nft-marketplace-server","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fnft-marketplace-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fnft-marketplace-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fnft-marketplace-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fnft-marketplace-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlabs-haskell","download_url":"https://codeload.github.com/mlabs-haskell/nft-marketplace-server/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlabs-haskell%2Fnft-marketplace-server/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29983156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-23T01:19:40.636Z","updated_at":"2026-03-01T20:32:09.217Z","avatar_url":"https://github.com/mlabs-haskell.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nft-marketplace-server\n## Manually create indexes after running migrations\n1. `CREATE INDEX CONCURRENTLY IF NOT EXISTS image_created_at_index ON image (created_at);`\n2. `CREATE INDEX CONCURRENTLY IF NOT EXISTS artist_created_at_index ON artist (created_at);`\n\n## Images\n### `GET /images` \nResponse with headers:\n```\n\u003c HTTP/1.1 206 Partial Content\n\u003c Transfer-Encoding: chunked\n\u003c Date: Wed, 09 Feb 2022 21:57:23 GMT\n\u003c Server: Warp/3.3.17\n\u003c Content-Type: application/json;charset=utf-8\n\u003c Total-Count: 0\n\u003c Accept-Ranges: createdAt\n\u003c Content-Range: createdAt 2022-02-09T21%3A55%3A34.31034Z..2022-02-09T21%3A55%3A34.31034Z\n\u003c Next-Range: createdAt 2022-02-09T21%3A55%3A34.31034Z;limit 100;offset 1;order desc\n\u003c\n* Connection #0 to host localhost left intact\n[{\"path\":\"marketplace-images/62ae402c7011b974019c2ca58af369100b53c32593a69de8cf3db8d7e09f5251_1.png\",\"createdAt\":\"2022-02-09T21:55:34.31034Z\",\"ipfsHash\":\"bafkreidcvzacy4arxf2adhbmuwfpg2iqbnj4gjmtu2o6rtz5xdl6bh2ske\",\"id\":54005,\"title\":\"My title2\",\"description\":\"image desc\",\"sha256hash\":\"62ae402c7011b974019c2ca58af369100b53c32593a69de8cf3db8d7e09f5251\"}]\n```\n#### Pagination\n* Header `Total-Count` -- total amount of entries\n* Default number of entries in a page is 100\n* To get next page send a request with the header `Range: \u003cnextRange\u003e` where value of `\u003cnextRange\u003e` is from the `Next-Range` header.\n* Example with `curl`:\n```curl -X GET /images -vH 'Range: createdAt 2021-11-23T10%3A45%3A10.31487Z;limit 1;offset 1;order desc```\n\n## Artists\n### `GET /artists`\nResponse with headers:\n```\n\u003c HTTP/1.1 206 Partial Content\n\u003c Transfer-Encoding: chunked\n\u003c Date: Thu, 25 Nov 2021 13:17:15 GMT\n\u003c Server: Warp/3.3.17\n\u003c Content-Type: application/json;charset=utf-8\n\u003c Total-Count: 1\n\u003c Accept-Ranges: createdAt\n\u003c Content-Range: createdAt 2021-11-25T13%3A16%3A49.023987Z..2021-11-25T13%3A16%3A49.023987Z\n\u003c Next-Range: createdAt 2021-11-25T13%3A16%3A49.023987Z;limit 100;offset 1;order desc\n\u003c\n\n[{\"createdAt\":\"2021-11-25T13:16:49.023987Z\",\"name\":\"abc\",\"pubKeyHash\":\"abc\",\"id\":4}]\n```\n\n#### Pagination\nSee image pagination.\n\n### `GET /artists/\u003cpubKeyHash\u003e`\nGet artist name by the given `pubKeyHash`.\n* Response ```{\"name\":\"a\"}```\n\n## Purchases\n### `GET /purchases/\u003cimageHash\u003e`\n* Response ```{\"purchases\":[{\"wasAuctioned\":true,\"authorPubKeyHash\":\"b\",\"createdAt\":\"2021-11-17T12:41:28.165871Z\",\"imageHash\":\"aaa\",\"id\":9,\"price\":\"d\",\"ownerPubKeyHash\":\"c\"}]}```\n\n## Admin API\nAuth by `Authorization: \u003ctoken\u003e` header.\n\n### `POST /admin/unlist_image/\u003cimageHash\u003e`\n\n### `POST /admin/create_artist`\n* Request ```{\"name\":\"abc\", \"pubKeyHash\": \"abc\"}```\n* Response ```{\"name\":\"abc\",\"pubKeyHash\":\"abc\"}```\n\n### `DELETE /admin/delete_artist/\u003cpubKeyHash\u003e`\n\n### `POST /admin/create_purchase`\n* Request \n```{\"imageHash\":\"a\", \"authorPubKeyHash\":\"b\", \"ownerPubKeyHash\":\"c\", \"price\":\"d\", \"wasAuctioned\":true }```\n* Response ```{\"wasAuctioned\":true,\"authorPubKeyHash\":\"b\",\"createdAt\":\"2021-11-17T12:34:37.528854171Z\",\"imageHash\":\"a\",\"price\":\"d\",\"ownerPubKeyHash\":\"c\"}```\n\n### `POST /admin/upload_image`\n```curl -X POST /images -F \"image=@Downloads/1.png\" -F \"title=My title2\" -F \"description=image description\"```\n* Response\n ```{\"sha256hash\":\"c33554365c53292952de796095bd16cffc25502971b5c17b3299ea0a69c4256f\"}```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlabs-haskell%2Fnft-marketplace-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlabs-haskell%2Fnft-marketplace-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlabs-haskell%2Fnft-marketplace-server/lists"}