How can I pull and store data from a website? - ios

My school recently got a new grade book software, and personally, I don't like the layout. I decided that I wanted to program my own, but my only snag is that I don't know how to pull my grades from the website. All I would need are my percentages (ints) in each subject. Once I had them stored I would be able to do the rest. Is there a way to do this in swift?
Thanks so much!!

You can not get website data without API call. You need an API giving data either in JSON or XML, then you have to call that service using Alamofire and there are number of methods to store data like realm database, NSDefaults etc.

Related

Firebase chat backup/export like whatsapp in SWIFT

i implemented a chat app in swift using firebase real time db, there user can send images, emojis and Text.Now i have a requirement of export chat or get the conversation's backup with media and text as per whatsApp.help me to solving it out.
While Firebase offers a backup for the Realtime Database, this doesn't fit your needs here, since you'll want a per-user export of the data.
Since this is specific to your application, you will have to code it yourself, just like the good folks at WhatsApp have probably done. It should be a matter of iterating over all data sources for the user, getting the data through the relevant API (that you're already using to display that data), and then writing to a local file). You can do this either client-side in your Swift code, or server-side on a server you already may have, or using Cloud Functions.
If you're looking for some inspiration for the latter, there is a sample repository that shows how to clean up a user's data, based on a set of wipe-out rules. You'll need to significantly modify this example though, so I'm not convinced this will be less work than rolling your own from scratch.

Import data from another source into Adobe Analytics

I’m trying to tie data from another product with my data inside of Adobe Analytics.
We have Adobe Analytics javascript on our website collecting data and we use a third party tool to track how users interact with certain parts of the website. We’re trying to use the Adobe API to tie the data together.
So far we’ve gone down the path of using the Data Insertion API, but it wasn’t quite right as it’s meant to be used as a replacement for the JS, from what I can tell.
We also explored using the Data Sources API. Now the documentation for this suggests you can use a transaction ID to tie offline data with the data collected from the JS, we’ve tried this and it doesn’t match the data up. We’re now exploring using Visitor ID to tie the sessions together but we’re having problems uploading any rows with the Visitor ID column, Adobe just returns the error “Column header: ‘visitorid’ is not a valid column header”. We’ve tried several different variations of visitor id, such as “visitor_id”, “visitor-id”, “vistor id”, etc and still no luck.
The end goal is for us to be able to upload data to Adobe that will update/add eVars for already existing sessions earlier that day. How would I go about doing this? Is there something I'm missing or doing wrong?
Edit: I managed to solve this problem by using the Adobe SAINT API. When a user arrives at the site, we push an eVar for that user with a unique ID and then the day after we use the SAINT API and the unique ID in the eVar we pushed previously to add the additional data we needed.
It could be a good idea to look back at the Data Insertion API and combine it with the visitorId approach where you tie existing/old visitorID's to new eVars and use the timestamp to "update" the dataset.
Although this is experimental, it might be worth a try.
Best regards,

Statistics regarding count of images that my app handles

I've got a REST webservice created using sinatra. I'd like to get a count of number of images processed by my app, so I can use it for analytics purposes. How would one be able to do it?
What would be a way to do this i.e like a field on the DB? or Analytics like GA? or some other way?
Any opinion is apreciated

JSON GET and POST

I am learning iOS app development.
I have JSON data coming from one of the sites in the form of Dictionary within an Array and within that Dictionary I have another Array and that contains another Dictionary.
for ex ,
Now I want to deserialize it and use it in my iOS app and also I have to post some data like a comment back to the server.The comment by teacher will be a POST to the server.
I hope the question makes sense.
I am stuck on how to deserialize this and use POST to server.
Any help is appreciated. Thanks in advance.
There are a couple of parts to your question:
1) To get the JSON data into a format which can easily be manipulated by your program, it's easiest to take an existing open-source JSON parser library and integrate it into your app. I like SBJSON. If you go to that site, it has instructions on including and using the library in your project.
2) To post a reply to the server, you need to know what format it expects the data in. Is your app interacting with an existing website (where a user could go to a page and fill out a form), or is it talking to an API?

Retrieving and Displaying tweets into an Windows 8 metro application

so basically I'm trying to display the latest tweets from 5-10 different sources/twitter accounts in a new application I'm trying to make.
Similarly the way tweetro/metrotwit retrieve and display tweets in the application. But on a much smaller scale.
Any ideas on how this could be done?
Would be much appreciated.
Duncan
Simply use the Twitter API to send a Web Service Request accessing those specific tweets in a data friendly format like XML or text. Then simply bind that data to a ListView or whatever pleases you.

Resources