{"id":29902732,"url":"https://github.com/anders617/mdining-proto","last_synced_at":"2025-08-01T16:12:17.563Z","repository":{"id":57293569,"uuid":"219231536","full_name":"anders617/mdining-proto","owner":"anders617","description":null,"archived":false,"fork":false,"pushed_at":"2020-10-14T01:43:16.000Z","size":90,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-25T11:53:06.072Z","etag":null,"topics":["api","api-client","bazel","dining-app","food","menu","michigan-dining-api","proto","umich","university-of-michigan","uofm"],"latest_commit_sha":null,"homepage":null,"language":"Starlark","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/anders617.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":"2019-11-03T00:28:16.000Z","updated_at":"2023-05-03T02:23:20.000Z","dependencies_parsed_at":"2022-09-01T08:42:06.533Z","dependency_job_id":null,"html_url":"https://github.com/anders617/mdining-proto","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/anders617/mdining-proto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders617%2Fmdining-proto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders617%2Fmdining-proto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders617%2Fmdining-proto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders617%2Fmdining-proto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anders617","download_url":"https://codeload.github.com/anders617/mdining-proto/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anders617%2Fmdining-proto/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268257463,"owners_count":24221059,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","api-client","bazel","dining-app","food","menu","michigan-dining-api","proto","umich","university-of-michigan","uofm"],"created_at":"2025-08-01T16:12:12.492Z","updated_at":"2025-08-01T16:12:17.549Z","avatar_url":"https://github.com/anders617.png","language":"Starlark","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mdining-proto\n\n[![Build Status](https://travis-ci.org/anders617/mdining-proto.svg?branch=master)](https://travis-ci.org/anders617/mdining-proto)\n\nProto definitions for use with the [michigan-dining-api](https://github.com/anders617/michigan-dining-api) service\n\nThe file [mdining.proto](https://github.com/anders617/mdining-proto/blob/master/proto/mdining.proto) defines the grpc service for michigan-dining-api and is the most important file for clients to use.\n\nThe remaining files define the proto messages used by the service\n\n## Language Support\n**[Bazel](#Bazel)** \\\n**[Go](#Go)** \\\n**[Javascript/Node.js](#Javascript/Node.js)**\n### Bazel\nAdd the following to your WORKSPACE file:\n```python\nload(\"@bazel_tools//tools/build_defs/repo:git.bzl\", \"git_repository\")\n\ngo_repository(\n    name = \"com_github_anders617_mdining_proto\",\n    importpath = \"github.com/anders617/mdining-proto\",\n    sum = \"h1:EqFtsULZ1MWoAAJKotZvMwR351syYg9eiDdBm1pBf78=\",\n    version = \"v0.2.2\",\n)\n\nload(\"@com_github_anders617_mdining_proto//rules:rule_deps.bzl\", \"rule_dependencies\")\nrule_dependencies()\nload(\"@com_github_anders617_mdining_proto//rules:proto_deps.bzl\", \"proto_dependencies\")\nproto_dependencies()\nload(\"@com_github_anders617_mdining_proto//rules:go_deps.bzl\", \"go_dependencies\")\ngo_dependencies()\n```\n### Go\nGo is supported through Bazel.\nYou can reference the `//proto:mdining_go_proto` target like so:\n```python\ngo_library(\n    name = \"my_library\",\n    srcs = [\n        \"my_source.go\"\n    ],\n    importpath = \"github.com/my/import/path\",\n    deps = [\n        \"@com_github_anders617_mdining_proto//proto:mdining_go_proto\",\n    ],\n)\n```\n\nIn your Go code:\n```go\npackage main\n\nimport (\n    \"context\"\n    \"fmt\"\n\n    pb \"github.com/anders617/mdining-proto/proto/mdining\"\n    \"google.golang.org/grpc\"\n)\n\nfunc main() {\n    address := \"michigan-dining-api.herokuapp.com:80\"\n    fmt.Printf(\"Connecting to %s...\", address)\n    conn, err := grpc.Dial(address, grpc.WithInsecure(), grpc.WithBlock())\n    if err != nil {\n        fmt.Printf(\"Could not dial %s: %s\", address, err)\n        return\n    }\n    defer conn.Close()\n    fmt.Printf(\"Connected\")\n\n    // Create the MDiningClient\n    client := pb.NewMDiningClient(conn)\n\n    // Send a GetDiningHalls request\n    diningHallsReply, err := client.GetDiningHalls(context.Background(), \u0026pb.DiningHallsRequest{})\n\n    if err != nil {\n        fmt.Printf(\"Could not call GetDiningHalls: %s\", err)\n        return\n    }\n    fmt.Printf(\"DiningHallsReply: %v\\n\", diningHallsReply)\n}\n```\n### Javascript/Node.js\nDownload the [npm package](https://www.npmjs.com/package/mdining-proto) using [npm](https://www.npmjs.com/get-npm):\n```shell\nnpm install mdining-proto\n```\nor [yarn](https://yarnpkg.com/en/docs/install#mac-stable):\n```shell\nyarn add mdining-proto\n```\nThen in your code you can import the proto types and client like so:\n```javascript\nimport { MDiningPromiseClient, DiningHallsRequest } from 'mdining-proto';\n\nconst client = new MDiningPromiseClient('https://michigan-dining-api.herokuapp.com');\n\nclient.getDiningHalls(new DiningHallsRequest())\n    .then((diningHalls) =\u003e console.log(diningHalls))\n    .catch((err) =\u003e console.log(err));\n```\n\n# Development\n\nRun the following command to build and publish the npm package\n```shell\nbazel run //:mdining_ts_proto_package.publish\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders617%2Fmdining-proto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanders617%2Fmdining-proto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanders617%2Fmdining-proto/lists"}