{"id":17047701,"url":"https://github.com/konradit/gopro-rb-api","last_synced_at":"2026-04-26T10:30:19.022Z","repository":{"id":56874981,"uuid":"81231295","full_name":"KonradIT/gopro-rb-api","owner":"KonradIT","description":"Unofficial Ruby GoPro API wrapper","archived":false,"fork":false,"pushed_at":"2017-06-13T08:25:16.000Z","size":4735,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-05T01:51:23.856Z","etag":null,"topics":["api-client","api-wrapper","gopro","hero4","ruby","ruby-gem"],"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/KonradIT.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":"2017-02-07T16:50:21.000Z","updated_at":"2022-09-26T14:07:28.000Z","dependencies_parsed_at":"2022-08-20T22:00:43.224Z","dependency_job_id":null,"html_url":"https://github.com/KonradIT/gopro-rb-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/KonradIT%2Fgopro-rb-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonradIT%2Fgopro-rb-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonradIT%2Fgopro-rb-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KonradIT%2Fgopro-rb-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KonradIT","download_url":"https://codeload.github.com/KonradIT/gopro-rb-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239937695,"owners_count":19721484,"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":["api-client","api-wrapper","gopro","hero4","ruby","ruby-gem"],"created_at":"2024-10-14T09:50:06.258Z","updated_at":"2026-04-26T10:30:18.981Z","avatar_url":"https://github.com/KonradIT.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GoPro Ruby API Wrapper\n\nA unofficial Ruby API wrapper for controlling GoPro HERO cameras over WiFi.\n\n[![Gem Version](https://badge.fury.io/rb/goprocam.svg)](https://badge.fury.io/rb/goprocam)\n\n### Installation:\n\n**From source**\n```\ngit clone http://github.com/konradit/gopro-rb-api\ncd gopro-rb-api\ngem build goprocam.gemspec\ngem install goprocam.gemspec\n```\n\n**From RubyGems**\n\n    gem install goprocam\n    \n\n### Supported cameras:\n\n- HERO4 Black, Silver\n- HERO4 Session\n- HERO+ / HERO+ LCD\n- HERO5 Black, Session\n\n#### Planned:\n\n- HERO3/3+\n\n\n### Usage:\n\nFirst of all:\n\n```ruby\nrequire '../lib/goprocam'\nrequire '../lib/constants'\n```\n\nor\n\n```ruby\nrequire 'goprocam'\n```\n\n### Initialising:\n\n```ruby\ngpCamera = Camera.new\n```\n\n| Code | Explanation |\n|------|-------------|\n|     gpControlCommand(X,Y) | Sends a command to the camera, using GoPro constants |\n|     shutter(param) | Starts a video or takes a picture\u003cbr\u003eparam=Shutter::ON or Shutter::OFF |\n|     camera_mode(X,Y) | Changes the mode, X=Mode, Y=Submode (default is 0). Example: camera_mode(Mode::PhotoMode, Mode::SubMode::Photo::Single) |\n|     status_raw() | Returns the status dump of the camera in json |\n|     status(X,Y) | Returns the status. \u003cbr\u003e\u003cul\u003e\u003cli\u003eX = Status::Status or Status::Settings\u003c/li\u003e\u003cli\u003eY = status id (Status/Setup/Video/Photo/MultiShot).\u003c/li\u003e\u003cli\u003eNOTE: This returns the status of the camera as an integer. To get the value in a human form use parse_value() \u003c/li\u003e\u003c/ul\u003e|\n|     parse_value(option, param) | Parse the raw value of status and print a human value.\u003cbr\u003e\u003cul\u003e\u003cli\u003eoption=\"mode\",\"sub_mode\",\"recording\",\"battery\",\"video_res\",\"video_fr\",\"rem_space\"\u003c/li\u003e\u003cli\u003eparam = Status ID\u003c/ul\u003e\n|     overview() | Prints a human-readable overview |\n|     info_camera(option) | Returns camera information\u003cbr\u003eoption = Name/Number/Firmware/SSID/MacAddress/SerialNumber\n|     delete() | Can be: delete(last) or delete(all) |\n|     delete_file(folder,file) | Deletes a specific file |\n|     hilight() | HiLights a moment in the video recording |\n|     power_on() | Powers the camera on. NOTE: run this to put your H4 Session into app mode first! |\n|     power_off() | Powers the camera off |\n|     sync_time() | Syncs the camera time to the computer's time |\n|     ap_setting(ssid,pass) | Change SSID and Password of the camera. HERO5 not supported. |\n|     locate(param) | Makes the camera beep. locate(Locate::Start) for start and locate(Locate::Stop) for stop. |\n|     reset() | Reset camera (protune or flash factory setting) |\n|     get_media() | returns the last media taken URL |\n|     dl_media() | Downloads latest media taken |\n|     list_media() | Outputs a prettified JSON media list |\n|     get_media_info(option) | Gets the media info\u003cbr\u003eoption=file/folder/size |\n|     livestream(param) | Starts, restarts or stops the livefeed via UDP. |\n\n\n### Examples:\n\n\n- **Get Status:**\n\tYou can get the current status for all aspects of the camera. Status messages are divided into sections:\n\t- Status\n\t- Settings\n\t\n\tSee [constants.rb](constants.rb) file for the status and settings available. For settings, you can use any Setup/Video/Photo/MultiShot variable.\n\t```ruby\n\tgpCamera = Camera.new\n\tputs gpCamera.status(Status::Status, Status::STATUS::Mode) #returns current mode\n\t\u003e0\n\tputs gpCamera.status(Status::Status, Status::STATUS::IsRecording) #returns recording status\n\t\u003e1\n\tputs gpCamera.status(Status::Settings, Video::FRAME_RATE) #returns frame rate\n\t\u003e3\n\tputs gpCamera.status(Status::Settings, Photo::RESOLUTION)\n\t\u003e9\n\tputs status(Status::Status, Status::STATUS::RemPhotos).to_s #some values do not need to be processed\n\t\u003e1998\n\tputs status(Status::Status, Status::STATUS::CamName) #This returns the camera SSID\n\t\u003eKonradHERO4Black2\n\t```\n\t\n\tNOTE: This status returns an integer which can be later matched with a human description. That is:\n\t\n\t```ruby\n\tputs gpCamera.parse_value(\"mode\",status(Status::Status, Status::STATUS::Mode))\n\t\u003eVideo\n\tputs gpCamera.parse_value(\"sub_mode\",status(Status::Status, Status::STATUS::SubMode))\n\t\u003eLooping\n\tputs gpCamera.parse_value(\"video_res\",status(Status::Settings, Video::RESOLUTION))\n\t\u003e1080p\n\tputs gpCamera.parse_value(\"video_fr\",status(Status::Settings, Video::FRAME_RATE))\n\t\u003e60\n\tputs gpCamera.parse_value(\"video_left\",status(Status::Status, Status::STATUS::RemVideoTime))\n\t\u003e01:14:23\n\tputs gpCamera.parse_value(\"battery\",status(Status::Status, Status::STATUS::BatteryLevel))\n\t\u003eFull\n\tputs gpCamera.parse_value(\"recording\",status(Status::Status, Status::STATUS::IsRecording))\n\t\u003eRecording\n\t```\n\t\n\tIf you want to get the raw status dump: ```gpCamera.status_raw()```\n\t\n\t\n- **Send a command:**\n\tYou can send a command to your camera wuth ```gpControlCommand```, this way you can change settings.\n\t\n\t```ruby\n\tgpCamera = Camera.new\n\tgpCamera.gpControlCommand(Multishot::BURST_RATE, Multishot::BurstRate::B5_1)\n\tgpCamera.gpControlCommand(Setup::ORIENTATION,Setup::Orientation::Down)\n\t```\n\t\n- **Shutter:**\n\n\tYou can start/stop a video or timelapse and take pictures.\n\n\t```ruby\n\tgpCamera = Camera.new\n\tgpCamera.shutter(Shutter::ON) #takes a picture or starts a video\n\tgpCamera.shutter(Shutter::OFF) #stops a video or timelapse\n\t```\n\n- **Change Modes:**\n\n\tModes available are: video,photo,multishot\n\t\n\tSubmodes available: \n\t\n\t- VideoMode: Video, Looping, TimeLapseVideo, VideoPhoto\n\t- PhotoMode: Single, Continuous, Night\n\t- MultiShotMode: Burst, TimeLapse, NightLapse\n\t\n\t**NOTE**: You can leave the submode empty and it will default to 0 (first submode in the mode).\n\t \n\t```ruby\n\tgpCamera = Camera.new\n\tgpCamera.camera_mode(Mode::VideoMode, Mode::SubModes::Video::TimeLapseVideo) #includes submode\n\tgpCamera.camera_mode(Mode::PhotoMode)\n\t```\n\t\n- **Get Last Media**\n\n\tYou can get the last media's URL and also download it to the working directory. Also you can get a list of all the files in the SD card.\n\t\n\t```ruby\n\tgpCamera = Camera.new\n\tputs gpCamera.get_media() #outputs last media url\n\tgpCamera.dl_media() #downloads last media\n\tputs gpCamera.list_media() #lists camera media\n\t```\n\t\n**For more examples see the examples folder**\n\nThis API is based on [goprowifihack](http://github.com/konradit/goprowifihack) - GoPro API docs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonradit%2Fgopro-rb-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkonradit%2Fgopro-rb-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkonradit%2Fgopro-rb-api/lists"}