-
Notifications
You must be signed in to change notification settings - Fork 1
knikolenko/libwolfram20
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
C++ library for using API Wolfram|Alpha v2.0. Version 1.0 Example: (using query) #include "Wolfram/WAEngine.h" ... WAEngine search; search.query.setInput("text for search"); search.query.addFormat("html"); search.query.addFormat("plaintext"); string queryURL = search.getURL(); ... Example: (read parsed data) WAEngine search; ... // Data from Wolfram|Alpha in 'data' ... search.Parse(data); int numPod = search.getCountPods(); WAPod * pods = search.getPods(); for (int i = 0; i < numPod; i++) { cout << "Pod " << i << endl; cout << "Title:" << pods[i].getTitle() << endl; cout << "ID:" << pods[i].getID() << endl; // Get a count of sub-blocks int numSubPod = pods[i].getCountSubpods(); int numStates = pods[i].getCountStates(); WASubpod * subpods = pods[i].getSubpods(); WAPodState * states = pods[i].getStates(); // Enumerate a subpods for (int j = 0; j < numSubPod; j++) { cout << "\tSubPod " << j << endl; // Get a subpod attributes cout << "\t\tTitle:" << subpods[j].getTitle() << endl; // Get a built-in img attributes cout << "\tImg" << endl; cout << "\t\tTitle:" << subpods[j].getImage()->getTitle() << endl; cout << "\t\tSrc:" << subpods[j].getImage()->getSrc() << endl; } // Enumerate a states for (int j = 0; j < numStates; j++) { cout << "\tStates " << j << endl; cout << "\t\tName:" << states[j].getName() << endl; } }
About
A C++ library for using Wolfram|Alpha API v2.0
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published