{"id":19585473,"url":"https://github.com/stremovskyy/gosrm","last_synced_at":"2025-04-27T11:33:39.995Z","repository":{"id":57483990,"uuid":"146734508","full_name":"stremovskyy/gosrm","owner":"stremovskyy","description":"OSRM Library for GO","archived":false,"fork":false,"pushed_at":"2024-01-21T19:27:06.000Z","size":64,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T15:45:21.718Z","etag":null,"topics":["client-library","go","golang","gosrm","osrm","osrm-backend"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stremovskyy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-30T10:33:59.000Z","updated_at":"2024-01-04T23:52:08.000Z","dependencies_parsed_at":"2024-06-19T11:15:25.865Z","dependency_job_id":"7af25586-04f1-49ae-93b5-a91dc25170ee","html_url":"https://github.com/stremovskyy/gosrm","commit_stats":{"total_commits":31,"total_committers":2,"mean_commits":15.5,"dds":0.4193548387096774,"last_synced_commit":"4d32e3a0a6c0756172e9b289ef19a9266e6f9fa9"},"previous_names":["karmadon/gosrm"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stremovskyy%2Fgosrm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stremovskyy%2Fgosrm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stremovskyy%2Fgosrm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stremovskyy%2Fgosrm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stremovskyy","download_url":"https://codeload.github.com/stremovskyy/gosrm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069542,"owners_count":17250455,"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":["client-library","go","golang","gosrm","osrm","osrm-backend"],"created_at":"2024-11-11T07:54:16.411Z","updated_at":"2024-11-11T07:54:17.236Z","avatar_url":"https://github.com/stremovskyy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GOSRM - GO Client for OSRM\n[![Build Status](https://travis-ci.org/stremovskyy/gosrm.svg?branch=master)](https://travis-ci.org/stremovskyy/gosrm)\n![Go](https://github.com/stremovskyy/gosrm/workflows/Go/badge.svg?branch=master)\n[![godoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat-square)](https://godoc.org/github.com/stremovskyy/gosrm)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/stremovskyy/gosrm)](https://goreportcard.com/report/github.com/stremovskyy/gosrm)\n\nAdvanced OSRM client for golang.\n\n## Features\n\n- Route Client\n\n## Installation\n\n```bash\ngo get github.com/stremovskyy/gosrm\n```\n\n## Quick Start\n\n#### Route Service\n\n```go\npackage main\n\nimport (\n\"fmt\"\n\t\"net/url\"\n\n\n\"github.com/paulmach/go.geo\"\n\"github.com/stremovskyy/gosrm\"\n)\n\nfunc main() {\n    options := \u0026gosrm.Options{\n        Url:            url.URL{Host: \"https://router.project-osrm.org/\"},\n        Service:        consts.ServiceRoute,\n        Version:        consts.VersionFirst,\n        Profile:        consts.ProfileDriving,\n        RequestTimeout: 5,\n    }\n\n    client := gosrm.NewClient(options)\n\n    routeRequest := \u0026models.RouteRequest{\n        Coordinates: geo.PointSet{{36.232051849365234, 49.98765584451778}, {36.22089385986328, 50.03718650830641}},\n    }\n\n    response, err := client.Route(routeRequest)\n    if err != nil {\n        panic(err.Error())\n    }\n\n    fmt.Printf(\"%#v\", response)\n}\n```\n#### Table Service\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"net/url\"\n\n\t\"github.com/paulmach/go.geo\"\n\t\"github.com/stremovskyy/gosrm\"\n)\n\nfunc main() {\n\toptions := \u0026gosrm.Options{\n\t\tUrl:            url.URL{Host: \"https://router.project-osrm.org/\"},\n\t\tService:        consts.ServiceTable,\n\t\tVersion:        consts.VersionFirst,\n\t\tProfile:        consts.ProfileDriving,\n\t\tRequestTimeout: 5,\n\t}\n\n\tclient := gosrm.NewClient(options)\n\n\tsources := []int{1, 2}\n\tdestinations := []int{2, 1}\n\n\tannotation := consts.TableAnnotationDurationDistance\n\tscaleFactor := 1.2\n\n\ttableRequest := \u0026models.TableRequest{\n\t\tCoordinates:  geo.PointSet{{36.232051849365234, 49.98765584451778}, {36.22089385986328, 50.03718650830641}},\n\t\tSources:      \u0026sources,\n\t\tDestinations: \u0026destinations,\n\t\tAnnotations:  \u0026annotation,\n\t\tScaleFactor:  \u0026scaleFactor,\n\t}\n\n\tresponse, err := client.Table(tableRequest)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\n\tfmt.Printf(\"%#v\", response)\n}\n```\n\n### Full Example\n\nSee `examples` folder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstremovskyy%2Fgosrm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstremovskyy%2Fgosrm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstremovskyy%2Fgosrm/lists"}