static void Main(string[] args) { try { var instagramProfiles = new List <InstagramProfile>() { new InstagramProfile("https://www.instagram.com/amyun.u/", "amyun.u"), }; var userLogin = new User { Username = "", Password = "" }; var instagramController = new InstagramController(userLogin, instagramProfiles, 0); instagramController.Run(); string amyJson = JsonConvert.SerializeObject(instagramProfiles[0]); var fileName = string.Format("{0}.json", instagramProfiles[0].Name); File.WriteAllText(fileName, amyJson, Encoding.UTF8); System.Console.WriteLine("Complete"); } catch (Exception ex) { System.Console.WriteLine(ex.Message); System.Console.WriteLine(ex.StackTrace); } }
// Start is called before the first frame update void Start() { if (!isTutorial) { Hide(setting); } // myCameraState = CameraState.Subway; myAppState = AppState.Mainpage; myHSS = GameObject.Find("Horizontal Scroll Snap").GetComponent <HorizontalScrollSnap>(); subwayScrollRect = GameObject.Find("Horizontal Scroll Snap").GetComponent <ScrollRect>(); InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); pageList.Add(RetroPage); pageList.Add(KararaPage); pageList.Add(DesignerPage); Hide(fishTalk); Hide(frontPage); Hide(postpage); HideAllPersonalPages(); Hide(TakePhoto); Hide(Posture); fishTalkText = fishTalk.gameObject.GetComponentInChildren <TextMeshProUGUI>(); //hide the UIs when click Karara Hide(clothCG); Hide(messageCG); Hide(Inventory); }
public static void RefreshInstagramCache(object data) { InstagramController controller = new InstagramController(); CurrentInstagramPosts = controller.Get(); CurrentUserData = controller.GetInstagramUserData(); }
// Start is called before the first frame updateGroup void Start() { FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); myImage = GetComponent <Image>(); mySprite = GetComponent <Image>().sprite; }
// Start is called before the first frame update void Start() { InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); currentSprite = GetComponent <Image>().sprite; username = GetComponentInChildren <Text>(); currentSprite = InstagramController.allProfile[username.text]; }
void Start() { FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); LevelManager = FinalCameraController.LevelManager; SpriteLoader = GameObject.Find("---SpriteLoader").GetComponent <SpriteLoader>(); SubwayMovement = GameObject.Find("---StationController").GetComponent <SubwayMovement>(); NPCNames.Add("???"); Sprite defaultProfile = Resources.Load <Sprite>("Images/NPC/X/Profile/DefaultProfile"); NPCAvatars.Add(defaultProfile); foreach (KeyValuePair <string, NPC> nameNPCPair in SpriteLoader.NPCDic) { //if (nameNPCPair.Key == "X"|| nameNPCPair.Key == "Karara") continue; if (nameNPCPair.Key == "Karara") { continue; } NPCNames.Add(nameNPCPair.Key); NPCAvatars.Add(nameNPCPair.Value.profile); Debug.Log("station for buttons" + nameNPCPair.Key); bagLogoInCollection.Add(nameNPCPair.Key, nameNPCPair.Value.bagLogo); } //三个站 每站4个tab matchedNPCIdx.Add(new List <int> { 0, 0, 0, 0 }); matchedNPCIdx.Add(new List <int> { 0, 0, 0, 0 }); matchedNPCIdx.Add(new List <int> { 0, 0, 0, 0 }); // station buttons don't need tab num InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); BagsController = GameObject.Find("---BagsController").GetComponent <BagsController>(); for (int i = 0; i < NPCNames.Count; i++) { ProfileUsageState.Add(""); } displayingBag = false; displayingProfile = false; exiting = false; UpdateCollectionUI(); }
void Start() { InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); if (!FinalCameraController.isTutorial) { for (int i = 0; i < allClothList.Count; i++) { allCloth.Add(allClothList[i].name, allClothList[i]); } for (int i = 0; i < allClothUIList.Count; i++) { allClothUI.Add(allClothUIList[i].name, allClothUIList[i]); } for (int i = 0; i < allSubwayClothList.Count; i++) { allSubwayCloth.Add(allSubwayClothList[i].name, allSubwayClothList[i]); print(allSubwayClothList[i].name); } for (int i = 0; i < inventory.Count; i++) { //inventory used to be buttons inventorySprite.Add(inventory[i].GetComponent <Button>().image.sprite); //inventorySprite.Add(inventory[i].GetComponent<SpriteRenderer>().sprite); } for (int i = 0; i < ClothPos1.Count; i++) { AllClothPos0.Add(ClothPos0[i].name, ClothPos0[i]); AllClothPos1.Add(ClothPos1[i].name, ClothPos1[i]); AllClothPos2.Add(ClothPos2[i].name, ClothPos2[i]); AllClothPos3.Add(ClothPos3[i].name, ClothPos3[i]); allAdCloth.Add(ClothPos0[i].name, ClothPos0[i]); } postureDictionaryList.Add(AllClothPos0); postureDictionaryList.Add(AllClothPos1); postureDictionaryList.Add(AllClothPos2); postureDictionaryList.Add(AllClothPos3); allAdCloth = postureDictionaryList[posNum]; } }
static void Main(string[] args) { try { var amyJson = File.ReadAllText("amyun.u.json"); var igAmy = JsonConvert.DeserializeObject <InstagramProfile>(amyJson); var userLogin = new User { Username = "", Password = "" }; foreach (var following in igAmy.Followings) { var fileName = string.Format("{0}\\{1}.json", igAmy.Name, following.Name); if (File.Exists(fileName)) { continue; } var instagramController = new InstagramController(userLogin, 0); instagramController.Login(); var ig = new InstagramProfile(following.URL, following.Name); instagramController.RunV2(ig); var igJson = JsonConvert.SerializeObject(ig); if (!Directory.Exists(igAmy.Name)) { Directory.CreateDirectory(igAmy.Name); } File.WriteAllText(fileName, igJson, Encoding.UTF8); instagramController.Close(); } Console.WriteLine("Complete"); } catch (Exception ex) { var errorMessage = string.Format("{0}{1}{2}", ex.Message, Environment.NewLine, ex.StackTrace); Console.WriteLine(errorMessage); File.AppendAllText("Error.txt", string.Format("{0}{1}", Environment.NewLine, errorMessage)); } }
//public Dictionary<string, Sprite> allSubAd = new Dictionary<string, Sprite>(); // Start is called before the first frame update void Start() { // for (int i = 0; i < subwayAdList.Count; i++) // { // allSubAd.Add(subwayAdList[i].name, subwayAdList[i]); // } InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); if (FinalCameraController.isTutorial) { TutorialManager = GameObject.Find("---TutorialManager").GetComponent <TutorialManager>(); } myButton = GetComponent <Button>(); }
// Start is called before the first frame update void Start() { currentSprite = GetComponent <Image>().sprite; username = GetComponentInChildren <Text>(); FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); ScreenshotHandler = GameObject.Find("Main Camera").GetComponent <ScreenshotHandler>(); myImage = GetComponent <Image>(); myButton = GetComponent <Button>(); InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); CalculateInventory = GameObject.Find("---InventoryController").GetComponent <CalculateInventory>(); if (GetComponent <RecordBackgroundPosture>() != null) { myBackgroundName = this.GetComponent <RecordBackgroundPosture>().backgroundName; } }
// Start is called before the first frame update void Start() { Debug.Log("PERSISTENT:" + Application.persistentDataPath); if (!isTutorial) { setting.SetActive(false); instruction.SetActive(false); } // myCameraState = CameraState.Subway; myAppState = AppState.Mainpage; CameraMovement = transform.gameObject.GetComponent <CameraMovement>(); InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); RatingSys = GameObject.Find("FloatingUI").GetComponent <RatingSystem>(); inventorySlotMgt = GameObject.Find("---InventoryController").GetComponent <InventorySlotMgt>(); FishBossNotification = GameObject.Find("FishBossUI").GetComponent <FishBossNotification>(); BagsController = GameObject.Find("---BagsController").GetComponent <BagsController>(); FishTextManager = GameObject.Find("---FishTextManager").GetComponent <FishTextManager>(); FishBossNotification.HideFish(); fishTalk.SetActive(false); Hide(frontPage); Hide(TakePhoto); Posture.SetActive(false); fishTalkText = fishTalk.gameObject.GetComponentInChildren <TextMeshPro>(); Hide(Inventory); Hide(fishShoutCG); ChapterOneEnd = false; alreadyClothUI = false; }
// Start is called before the first frame update void Start() { RatingSys = GameObject.Find("FloatingUI").GetComponent <RatingSystem>(); InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); }
// Start is called before the first frame update void Start() { FinalCameraController = GameObject.Find("Main Camera").GetComponent <FinalCameraController>(); InstagramController = GameObject.Find("---InstagramController").GetComponent <InstagramController>(); BagsController = GameObject.Find("---BagsController").GetComponent <BagsController>(); AdsController = GameObject.Find("---AdsController").GetComponent <AdsController>(); AudioManager = GameObject.Find("---AudioManager").GetComponent <AudioManager>(); ValueEditor = GameObject.Find("---ValueEditor").GetComponent <ValueEditor>(); if (!FinalCameraController.isTutorial) { LevelManager = FinalCameraController.LevelManager; bagPosAvailable.Add(false); bagPosAvailable.Add(false); bagPosAvailable.Add(false); noSameBag = true; aSR = arrow.GetComponent <SpriteRenderer>(); hSR = highlight.GetComponent <SpriteRenderer>(); //tabImg0 = GameObject.Find("bag0Logo").GetComponent<Image>(); //tabImg1 = GameObject.Find("bag1Logo").GetComponent<Image>(); LostAndFound = GameObject.Find("Lost&Found_basket").GetComponent <LostAndFound>(); //tab0 = GameObject.Find("bagTab0"); //tab1 = GameObject.Find("bagTab1"); collection.SetActive(false); } // 不知道 real timer干什么用的 realTimer = (moveTime + stayTime + pauseTime) * 3 - timer; NameToStationBags.Add(bagStation0); NameToStationBags.Add(bagStation1); NameToStationBags.Add(bagStation2); AllDetailList.Add(detailList0); AllDetailList.Add(detailList1); DetailCG.Add(dSR1); DetailCG.Add(dSR2); currentStation = 0; stationTimer = stayTime; // CountDownTimer.text = ""; if (!FinalCameraController.isTutorial) { //get all the doors position when game starts left1Pos = left1.position.x; right1Pos = right1.position.x; } //get all station names into the dictionary for (var i = 0; i < stationNames.Count; ++i) { allStation.Add(stationNames[i], i); } //trainStop(); }
public InstagramControllerTest() { _instaService = new Mock <IInstagramService>(); _instaController = new InstagramController(_instaService.Object); _fixture = new Fixture(); }