Instantly share code, notes, and snippets.

View all-videos-mock.json
This file has been truncated, but you can view the full file.
json: ["VideoAll": <__NSArrayI 0x7fb58ca64e00>(
{
actorsDisplay = "asperiores debitis quia commodi et";
appears = "2017-08-07T07:53:35Z";
assetName = distinctio;
billingID = "b553bde9-7b79-4805-a075-7a47cbbd52da";
calendarEventId = "a2c081c4-1934-4b07-bb4a-027f156ece7b";
closedCaptioning = 1;
contentId = "ec61de1f-6339-4cd3-884c-230f5cc05a94";
View media.json
{
"data": {
"query": {
"hits": [
{
"hit": {
"type": "Video",
"contentId": "43f7cfeb-4f0e-4018-b536-723d03095aab",
"appears": "2017-05-24T16:59:00Z",
"milestoneStart": null,
View PlaylistStackAdapter.java
package com.wwe.universe.ui.adapter;
import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
View linkToTestWatchList.html
https://search-api-wwe-mock.bamgrid.com/svc/search/v2/graphql?query=fragment%20tag%20on%20Tag%20%7B%0A%20%20type%0A%20%20value%0A%20%20displayName%0A%7D%0A%0Afragment%20cmsItem%20on%20CmsItem%20%7B%0A%20%20contentId%0A%20%20type%0A%20%20tags(type%3A%20%24tag_types)%20%7B%0A%20%20%20%20...tag%0A%20%20%7D%0A%7D%0A%0Afragment%20hyperMediaLink%20on%20HypermediaLink%20%7B%0A%20%20href%0A%20%20params%20%7B%0A%20%20%20%20name%0A%20%20%20%20description%0A%20%20%7D%0A%20%20rel%0A%20%20templated%0A%7D%0A%0Afragment%20photo%20on%20Photo%20%7B%0A%20%20...cmsItem%0A%20%20height%0A%20%20imageLocation%0A%20%20masterCutId%0A%20%20width%0A%7D%0A%0Afragment%20photoAsset%20on%20PhotoAsset%20%7B%0A%20%20...cmsItem%0A%20%20altText%0A%20%20caption%0A%20%20credit%0A%20%20headline%0A%20%20rawImage%0A%20%20width%0A%20%20height%0A%20%20inning%0A%20%20purchaseUrl%0A%20%20photos(max_width%3A%20%24max_width%2C%20min_width%3A%20%24min_width%2C%20max_height%3A%20%24max_height%2C%20min_height%3A%20%24min_height%2C%20dimensions%3A%20%24dimen
View BAMify.sh
git clone https://github.com/Shopify/graphql_swift_gen.git
cd graphql_swift_gen
mkdir BAM
cd BAM
mkdir Source
cd ..
# optional - install RVM for ruby version managing.
curl -sSL https://get.rvm.io
rvm install ruby --latest
gem install bundler
View Airings.graphql
query Airings {
Airings(channelId: $channelId) @paginate(startIndex: 1, maxResults: 5) {
contentId, mediaId, eventId, programId, partnerProgramId
startDate, endDate, expires
linear, runTime
playbackUrls {
rel
href
}
titles {
View Airings.scala
// This file was automatically generated and should not be edited.
import Apollo
public final class SomestringQuery: GraphQLQuery {
public static let operationString =
"query SOMESTRING {" +
" Airings(channelId: \"MTV1\") @paginate(startIndex: 1, maxResults: 5) {" +
" __typename" +
" contentId" +
View API.scala
// This file was automatically generated and should not be edited.
import Apollo
/// The episodes in the Star Wars trilogy
public enum Episode: String {
case newhope = "NEWHOPE" /// Star Wars Episode IV: A New Hope, released in 1977.
case empire = "EMPIRE" /// Star Wars Episode V: The Empire Strikes Back, released in 1980.
case jedi = "JEDI" /// Star Wars Episode VI: Return of the Jedi, released in 1983.
}
View IndicatorInfo.swift
public struct IndicatorInfo {
public var title: String
public var image: UIImage?
public var highlightedImage: UIImage?
public init(title: String) {
self.title = title
}
View dumpSwaggerJson.sh
// chomd +x dumpSwaggerJson.sh
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channels.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1092 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1092.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1701 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1701.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1408 -H "access-control-allow-origin: *" -H "accept: application/json" -H "content-type: application/json" > channel1408.json
curl -X GET https://virtserver.swaggerhub.com/osman/emerald/1.0.0/channels/channelContent?channelid=1078 -H "access-contro