{"id":28495383,"url":"https://github.com/topbitdu/wechat-jsapi","last_synced_at":"2025-08-19T18:52:07.227Z","repository":{"id":56898047,"uuid":"52658863","full_name":"topbitdu/wechat-jsapi","owner":"topbitdu","description":"Wechat JS API library is a low level library for Wechat JS APIs. 微信JS API库是一个调用微信JS API的低层库。","archived":false,"fork":false,"pushed_at":"2017-05-13T05:49:24.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-03T23:49:16.232Z","etag":null,"topics":["js-api","wechat"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/topbitdu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-27T09:12:12.000Z","updated_at":"2019-10-28T09:23:09.000Z","dependencies_parsed_at":"2022-08-21T02:20:17.105Z","dependency_job_id":null,"html_url":"https://github.com/topbitdu/wechat-jsapi","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/topbitdu/wechat-jsapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Fwechat-jsapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Fwechat-jsapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Fwechat-jsapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Fwechat-jsapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/topbitdu","download_url":"https://codeload.github.com/topbitdu/wechat-jsapi/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/topbitdu%2Fwechat-jsapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263017658,"owners_count":23400551,"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":["js-api","wechat"],"created_at":"2025-06-08T11:10:27.872Z","updated_at":"2025-07-01T18:33:00.859Z","avatar_url":"https://github.com/topbitdu.png","language":"Ruby","readme":"# Wechat JS API Library 微信JS API库\n\n[![Documentation](http://img.shields.io/badge/docs-rdoc.info-blue.svg)](http://www.rubydoc.info/gems/wechat-jsapi/frames)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](http://opensource.org/licenses/MIT)\n\n[![Gem Version](https://badge.fury.io/rb/wechat-jsapi.svg)](https://badge.fury.io/rb/wechat-jsapi)\n[![Dependency Status](https://gemnasium.com/badges/github.com/topbitdu/wechat-jsapi.svg)](https://gemnasium.com/github.com/topbitdu/wechat-jsapi)\n\nWechat JS API library is a low level library for Wechat JS APIs. 微信JS API库是一个调用[微信JS API](http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html)的低层库。\n\n\n\n## Recent Update\n\nCheck out the [Road Map](ROADMAP.md) to find out what's the next.\nCheck out the [Change Log](CHANGELOG.md) to find out what's new.\n\n\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'wechat-jsapi'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install wechat-jsapi\n\n\n\n## Usage\n\n[Signature 签名算法](http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html#.E9.99.84.E5.BD.951-JS-SDK.E4.BD.BF.E7.94.A8.E6.9D.83.E9.99.90.E7.AD.BE.E5.90.8D.E7.AE.97.E6.B3.95)\n```ruby\nsignature = Wechat::JSAPI::Signature.create link, ticket, timestamp, nonce\n```\n\n[Get JS API Ticket 获得jsapi_ticket](http://mp.weixin.qq.com/wiki/11/74ad127cc054f6b80759c40f77ec03db.html#.E9.99.84.E5.BD.951-JS-SDK.E4.BD.BF.E7.94.A8.E6.9D.83.E9.99.90.E7.AD.BE.E5.90.8D.E7.AE.97.E6.B3.95)\n```ruby\nresponse = Wechat::JSAPI::Ticket.create access_token\nif response.present? \u0026\u0026 0==response['errcode'].to_i\n  ticket     = response['ticket']\n  expires_in = response['expires_in']\nelse\n  # Show response['errmsg']\nend\n```\n\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/topbitdu/wechat-jsapi. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopbitdu%2Fwechat-jsapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftopbitdu%2Fwechat-jsapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftopbitdu%2Fwechat-jsapi/lists"}