{"id":23096743,"url":"https://github.com/jetrockets/perfect_audit","last_synced_at":"2025-09-07T23:43:35.244Z","repository":{"id":56887802,"uuid":"125986955","full_name":"jetrockets/perfect_audit","owner":"jetrockets","description":"PerfectAudit Ruby API wrapper","archived":false,"fork":false,"pushed_at":"2023-06-08T12:30:53.000Z","size":68,"stargazers_count":4,"open_issues_count":2,"forks_count":3,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-20T22:55:51.666Z","etag":null,"topics":["api-client","api-wrapper","perfectaudit","ruby","ruby-gem"],"latest_commit_sha":null,"homepage":"https://www.perfectaudit.com","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/jetrockets.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-03-20T08:46:01.000Z","updated_at":"2023-03-13T17:20:57.000Z","dependencies_parsed_at":"2023-07-15T15:33:05.000Z","dependency_job_id":null,"html_url":"https://github.com/jetrockets/perfect_audit","commit_stats":null,"previous_names":["igor-alexandrov/perfect_audit"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/jetrockets/perfect_audit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrockets%2Fperfect_audit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrockets%2Fperfect_audit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrockets%2Fperfect_audit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrockets%2Fperfect_audit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jetrockets","download_url":"https://codeload.github.com/jetrockets/perfect_audit/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jetrockets%2Fperfect_audit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274112856,"owners_count":25224332,"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-09-07T02:00:09.463Z","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-client","api-wrapper","perfectaudit","ruby","ruby-gem"],"created_at":"2024-12-16T22:48:11.509Z","updated_at":"2025-09-07T23:43:35.209Z","avatar_url":"https://github.com/jetrockets.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PerfectAudit\n\n[![Gem Version](https://badge.fury.io/rb/perfect_audit.svg)](https://badge.fury.io/rb/perfect_audit)\n[![Build Status](https://travis-ci.org/jetrockets/perfect_audit.svg?branch=master)](https://travis-ci.org/jetrockets/perfect_audit)\n[![Maintainability](https://api.codeclimate.com/v1/badges/f416de8dc8074f1b1588/maintainability)](https://codeclimate.com/github/jetrockets/perfect_audit/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/f416de8dc8074f1b1588/test_coverage)](https://codeclimate.com/github/jetrockets/perfect_audit/test_coverage)\n\nPerfect Audit API wrapper.\n\n[https://ocrolus.com/api-docs/](https://ocrolus.com/api-docs/)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'perfect_audit'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install perfect_audit\n\n## Configuration\n\n``` ruby\n  PerfectAudit.configure do |config|\n    config.client_id = 'your_client_id'\n    config.client_secret = 'your_client_secret'\n  end\n```\n\n## Exception Handling\n\nIf PerfectAudit will return anything different from 200 OK status code, `PerfectAudit::Error` will be raised. It contains `#message` and `#code` returned from API.\n\nFor example with invalid credentials you will receive:\n\n``` ruby\nPerfectAudit.books.all\n#=\u003e PerfectAudit::Error: Email and/or password not found [1306]\n```\n\nAnd if you will try to find a Book that does not exist, you will receive:\n\n``` ruby\nPerfectAudit.books.find(82087)\n#=\u003e PerfectAudit::Error: Book not found [1401]\n```\n\n## Usage\n\n### Books Repository\n\nGet books list for your account\n\n``` ruby\nPerfectAudit.books.all\n#=\u003e [#\u003cPerfectAudit::Book:0x00007ff51bbfbe28\u003e, ...]\n```\n\nCreate a book\n\n``` ruby\n# Create a book with name=Test\nPerfectAudit.books.create('Test')\n#=\u003e #\u003cPerfectAudit::Book:0x00007ff51c8e4248 @id=0, @created_at=\"2018-03-22T20:21:25Z\", @name=\"Test\", @public=false ...\u003e\n\n# Create a book with name=Test which is public\nPerfectAudit.books.create('Test', true)\n#=\u003e #\u003cPerfectAudit::Book:0x00007ff51c8e4248 @id=0, @created_at=\"2018-03-22T20:21:25Z\", @name=\"Test\", @public=true ...\u003e\n```\n\nFind book by ID\n\n``` ruby\nPerfectAudit.books.find(100)\n#=\u003e #\u003cPerfectAudit::Book:0x00007ff51c89f828 @id=100, @created_at=\"2018-03-22T20:48:54Z\", @name=\"Test\", @public=false ...\u003e\n```\n\nDelete a book\n\n``` ruby\n# To delete a book you can use either its ID or instance\nPerfectAudit.books.delete(100)\n#=\u003e true\n\nbook = PerfectAudit.books.find(100)\nPerfectAudit.books.delete(book)\n#=\u003e true\n```\n\nExport book to Excel\n``` ruby\nbook = PerfectAudit.books.find(100)\nFile.write('./book.xlsx', PerfectAudit.books.to_excel(book))\n```\n\n### Documents Repository\n\nUpload document to a book\n\n``` ruby\n# To upload documents to a book you can use book ID or its instance and File\nPerfectAudit.documents.create(100, File.open('./document.pdf'))\n#=\u003e true\n\nbook = PerfectAudit.books.find(100)\nPerfectAudit.documents.create(book, File.open('./document.pdf'))\n#=\u003e true\n```\n\n## Credits\n\nSponsored by [JetRockets](http://www.jetrockets.pro).\n\n![JetRockets](http://jetrockets.pro/JetRockets.jpg)\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetrockets%2Fperfect_audit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjetrockets%2Fperfect_audit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjetrockets%2Fperfect_audit/lists"}