#!/usr/bin/env python # coding: utf-8 # In[1]: from memair import Memair # Use Otto the sandbox user's access token or create your own at https://memair.com/temporary_access_token access_token = '0000000000000000000000000000000000000000000000000000000000000000' user = Memair(access_token) # In[2]: recommendation = user.query(''' mutation { CreateRecommendation( priority: 73.9 type: video expires_at: tomorrow url: "https://youtu.be/LQCoHLQkFxw" ) { id timestamp is_expired is_actioned } } ''') recommendation_id = recommendation['data']['CreateRecommendation']['id'] recommendation # In[3]: user.query(''' mutation { ActionRecommendation( id: %s actioned_at: yesterday ) { id is_actioned actioned_at } } ''' % recommendation_id) # In[4]: user.query(''' mutation delete_recommendation{ DeleteRecommendation( id: %s ) } ''' % recommendation_id)