This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function myFunction () { | |
| //Grab antiForgeryToken. (Don't forget to add @Html.AntiForgeryToken() to your view or this will be empty) | |
| var antiForgeryToken = $("input[name=__RequestVerificationToken]").val(); | |
| //Prepare parameters | |
| var params = { | |
| FirstName: "Joshua", | |
| LastName: "Harms" | |
| }; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Helpers; | |
| using System.Web.Mvc; | |
| namespace MyNamespace.Controllers | |
| { | |
| [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false, Inherited = true)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Web; | |
| using System.Web.Helpers; | |
| using System.Web.Mvc; | |
| namespace MyNamespace.Controllers{ | |
| public class SomePathController : Controller{ | |
| // POST: /SomePath/DoSomething |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <reference path="../typings/jquery/jquery.d.ts" /> | |
| // Extend the jQueryAjaxSettings interface that should be defined at /scripts/typings/jquery/jquery.d.ts | |
| // Don't have that file? Install with NuGet: install-package jquery.typescript.definitelytyped | |
| interface JQueryAjaxSettings { | |
| /** | |
| * Load data from the server using a HTTP POST request. | |
| * | |
| * @param url A string containing the URL to which the request is sent. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| namespace ButterflyCore.Models | |
| { | |
| public class Thumbnail | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using ButterflyCore.Models; | |
| using Newtonsoft.Json; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Text; | |
| using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Windows.Storage; | |
| using Windows.ApplicationModel.Background; | |
| using ButterflyCore; | |
| using Windows.UI.Notifications; | |
| using Windows.Data.Xml.Dom; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Page | |
| x:Name="pageRoot" | |
| x:Class="Space_Butterfly.MainPage" | |
| DataContext="{Binding Items, RelativeSource={RelativeSource Self}}" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:local="using:Space_Butterfly"\ | |
| xmlns:common="using:Space_Butterfly.Common" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Try to get the user's subscription charge. If it returns a 404 "Not Found" message, | |
| //then their subscription is no longer valid. | |
| try | |
| { | |
| charge = await service.GetAsync(user.ShopifyChargeId.Value); | |
| } | |
| catch (ShopifyException e) | |
| when (e.Message.Equals("not found", StringComparison.OrdinalIgnoreCase)) | |
| { | |
| await DeleteChargeId(user); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Using ShopifySharp from https://github.com/nozzlegear/ShopifySharp | |
| using ShopifySharp; | |
| ... | |
| public void MySnippetCreatorMethod() | |
| { | |
| var service = new ShopifyAssetService(myShopifyUrl, accessToken); | |
| var themeId = 123456; | |
| var asset = new ShopifyAsset() |