{'json'=>'json','blob'=>'raw','raw'=>'raw+json','text'=>'text+json','html'=>'html+json','full'=>'full+json'}
Parse media type param.
2627282930 | # File 'lib/github_api/mime_type.rb', line 26deflookup_media(name)MEDIA_LOOKUP.fetch(name)doraiseArgumentError,"Provided Media Type #{name} is not valid"endend |
Parse media type param
1718192021222324 | # File 'lib/github_api/mime_type.rb', line 17defparse(media)version='v3'media.sub!(/^[.]*|[.]*$/,"")media=media.include?('+')?media.split('+')[0]:mediaversion,media=media.split('.')ifmedia.include?('.')media_type=lookup_media(media)"application/vnd.github.#{version}.#{media_type}"end |