{"id":13550902,"url":"https://github.com/hashworks/go-xREL-API","last_synced_at":"2025-04-03T01:30:38.161Z","repository":{"id":56575149,"uuid":"56392344","full_name":"hashworks/go-xREL-API","owner":"hashworks","description":"A golang package to authorize with and access the complete xrel.to API.","archived":false,"fork":false,"pushed_at":"2020-10-30T16:47:20.000Z","size":110,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T19:17:51.167Z","etag":null,"topics":["golang","hacktoberfest","xrel","xrel-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hashworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-16T15:57:03.000Z","updated_at":"2024-02-15T13:07:53.000Z","dependencies_parsed_at":"2022-08-15T21:10:52.448Z","dependency_job_id":null,"html_url":"https://github.com/hashworks/go-xREL-API","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashworks%2Fgo-xREL-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashworks%2Fgo-xREL-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashworks%2Fgo-xREL-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hashworks%2Fgo-xREL-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hashworks","download_url":"https://codeload.github.com/hashworks/go-xREL-API/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246921919,"owners_count":20855339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["golang","hacktoberfest","xrel","xrel-api"],"created_at":"2024-08-01T12:01:39.257Z","updated_at":"2025-04-03T01:30:37.705Z","avatar_url":"https://github.com/hashworks.png","language":"Go","readme":"# xREL API Package\n\n[![GoDoc](https://godoc.org/github.com/hashworks/go-xREL-API/xrel?status.svg)](https://godoc.org/github.com/hashworks/go-xREL-API/xrel)\n\nA golang package to authorize with and access the complete xrel.to API.\n\nImport this way:\n```go\nimport github.com/hashworks/go-xREL-API/xrel\n```\n\nAll methods may return a `types.Error` struct, which implements the normal `error` type.\nAdditional to the `Error()` function this struct contains the variables `Type` and `Code`.\nErrors with type `api` are [xREL.to errors](https://www.xrel.to/wiki/6435/api-errors.html), for all other\ntypes and error codes see the `xrel/types/errors.go` file.\n\nTo use this in your code try to cast it:\n```go\nerr := xrel.SomeMethod()\nif eErr, ok := err.(*types.Error); ok {\n\t// Is of type types.Error, you can use the variables\n} else {\n\t// Is normal error\n}\n```\n\nIf you use the OAuth authentication make sure to save the Config variable somewhere and set it again on your next run.\nHere is an example how to use the OAuth2 authentication:\n\n```go\nxrel.ConfigureOAuth2(\"OAUTH2_CLIENT_KEY\", \"OAUTH2_CLIENT_SECRET\", \"\", []string{\"viewnfo\", \"addproof\"})\n\nfmt.Println(\"(1) Go to: \" + xrel.GetOAuth2AuthURL(\"\"))\nfmt.Println(\"(2) Grant access, you should get back a verification code.\")\nfmt.Print(\"(3) Enter that verification code here: \")\nverificationCode := \"\"\nfmt.Scanln(\u0026verificationCode)\n\nerr := xrel.PerformOAuth2UserAuthentication(verificationCode)\nok(err)\n\n```","funding_links":[],"categories":["Go","golang"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashworks%2Fgo-xREL-API","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhashworks%2Fgo-xREL-API","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhashworks%2Fgo-xREL-API/lists"}