{"id":16826140,"url":"https://github.com/ggarnier/dailymotion-api-client","last_synced_at":"2025-04-11T03:42:06.078Z","repository":{"id":7266865,"uuid":"8579760","full_name":"ggarnier/dailymotion-api-client","owner":"ggarnier","description":"DailyMotion API Ruby client","archived":false,"fork":false,"pushed_at":"2020-09-29T16:09:29.000Z","size":173,"stargazers_count":1,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-24T22:01:44.900Z","etag":null,"topics":["dailymotion","hacktoberfest","ruby","video"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/ggarnier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2013-03-05T12:57:01.000Z","updated_at":"2020-10-05T14:06:49.000Z","dependencies_parsed_at":"2022-09-12T03:11:29.635Z","dependency_job_id":null,"html_url":"https://github.com/ggarnier/dailymotion-api-client","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/ggarnier%2Fdailymotion-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggarnier%2Fdailymotion-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggarnier%2Fdailymotion-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ggarnier%2Fdailymotion-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ggarnier","download_url":"https://codeload.github.com/ggarnier/dailymotion-api-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248339287,"owners_count":21087213,"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":["dailymotion","hacktoberfest","ruby","video"],"created_at":"2024-10-13T11:16:32.037Z","updated_at":"2025-04-11T03:42:06.051Z","avatar_url":"https://github.com/ggarnier.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DailyMotion API Ruby Client\n\n[![Build Status](https://travis-ci.org/ggarnier/dailymotion-api-client.svg)](https://travis-ci.org/ggarnier/dailymotion-api-client)\n\nClient for DailyMotion API (http://www.dailymotion.com/doc/api/graph-api.html) written in Ruby.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem 'dailymotion-api-client'\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install dailymotion-api-client\n\n## Usage\n\nTo use this client, you need to register an account at Dailymotion and [create an API key](http://www.dailymotion.com/settings/developer/new). You need an API key and API secret.\n\n```ruby\n# Create an instance of DailymotionApi::Client\nclient = DailymotionApi::Client.new(username: \"username\", password: \"password\", api_key: \"key\", api_secret: \"secret\")\n```\n\n### Publishing a video\n\n```ruby\n# Request an access token\nclient.request_access_token\n\n# Request an upload url\nclient.generate_upload_url\n\n# Post your video\nclient.post_video(File.new(\"my_video.mp4\"))\n\n# Create a video\nclient.create_video\n\n# Update video metadata an publish it\nclient.publish_video(title: \"my video\", channel: \"shortfilms\", tags: \"my_tag\")\n```\n\n### Getting info about a published video\n\n```ruby\n# Get basic metadata for a video with id \"video_id\"\nclient.get_video(\"video_id\")\n=\u003e {\"id\"=\u003e\"video_id\", \"title\"=\u003e\"my video\", \"channel\"=\u003e\"shortfilms\", \"owner\"=\u003e\"owner_id\"}\n\n# Get specific fields for a video with id \"video_id\"\nclient.get_video(\"video_id\", \"url,title\")\n=\u003e {\"url\"=\u003e\"http://www.dailymotion.com/video/video_id_my-video_shortfilms\", \"title\"=\u003e\"my video\"}\n```\n\n### Getting info about authenticated user\n\n```ruby\nclient.request_access_token\n\nclient.get_authenticated_user_info\n=\u003e {\"id\"=\u003e\"owner_id\", \"screenname\"=\u003e\"username\"}\n\nclient.get_authenticated_user_info(\"screenname\")\n=\u003e {\"screenname\"=\u003e\"username\"}\n```\n\n### Getting a list of videos published by authenticated user\n\n```ruby\nclient.request_access_token\n\nclient.get_authenticated_user_videos\n=\u003e {\"page\"=\u003e1, \"limit\"=\u003e10, \"explicit\"=\u003efalse, \"total\"=\u003e1, \"has_more\"=\u003efalse, \"list\"=\u003e[{\"id\"=\u003e\"video_id\", \"title\"=\u003e\"my video\", \"channel\"=\u003e\"shortfilms\", \"owner\"=\u003e\"owner_id\"}]}\n\nclient.get_authenticated_user_videos(\"url\")\n =\u003e {\"page\"=\u003e1, \"limit\"=\u003e10, \"explicit\"=\u003efalse, \"total\"=\u003e1, \"has_more\"=\u003efalse, \"list\"=\u003e[{\"url\"=\u003e\"http://www.dailymotion.com/video/video_id_my-video_shortfilms\"}]}\n```\n\n### Deleting a video\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggarnier%2Fdailymotion-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fggarnier%2Fdailymotion-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fggarnier%2Fdailymotion-api-client/lists"}