Changed C++ standard to C++17 and will implement functionality to retrieve songs, albums, artists, genres, cover art, and year records in json. Will add explicit versioning too
This commit is contained in:
+40
-40
@@ -1,4 +1,4 @@
|
||||
#include"APIParser.h"
|
||||
#include"Parsers/APIParser.h"
|
||||
|
||||
#include<iostream>
|
||||
|
||||
@@ -10,50 +10,50 @@ using Models::IcarusAction;
|
||||
|
||||
namespace Parsers
|
||||
{
|
||||
#pragma
|
||||
APIParser::APIParser(IcarusAction icaAct)
|
||||
{
|
||||
this->icaAct = icaAct;
|
||||
api = API{};
|
||||
parseAPI();
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma
|
||||
APIParser::APIParser(IcarusAction icaAct)
|
||||
{
|
||||
this->icaAct = icaAct;
|
||||
api = API{};
|
||||
parseAPI();
|
||||
}
|
||||
#pragma endregion
|
||||
|
||||
|
||||
#pragma
|
||||
API APIParser::retrieveAPI() const
|
||||
{
|
||||
return api;
|
||||
}
|
||||
#pragma
|
||||
API APIParser::retrieveAPI() const
|
||||
{
|
||||
return api;
|
||||
}
|
||||
|
||||
void APIParser::parseAPI()
|
||||
{
|
||||
auto flags = icaAct.flags;
|
||||
cout<<"Parsing api"<<endl;
|
||||
void APIParser::parseAPI()
|
||||
{
|
||||
auto flags = icaAct.flags;
|
||||
cout<<"Parsing api"<<endl;
|
||||
|
||||
//for (auto flag : flags)
|
||||
for (auto i =0; i < flags.size(); ++i)
|
||||
{
|
||||
auto arg = flags[i].flag;
|
||||
auto value = flags[i].value;
|
||||
//for (auto flag : flags)
|
||||
for (auto i =0; i < flags.size(); ++i)
|
||||
{
|
||||
auto arg = flags[i].flag;
|
||||
auto value = flags[i].value;
|
||||
|
||||
if (arg.compare("-h") == 0)
|
||||
|
||||
{
|
||||
api.url = value;
|
||||
}
|
||||
if (value.compare("-h") == 0)
|
||||
{
|
||||
api.url = flags[i + 1].value;
|
||||
}
|
||||
if (arg.compare("-h") == 0)
|
||||
|
||||
{
|
||||
api.url = value;
|
||||
}
|
||||
if (value.compare("-h") == 0)
|
||||
{
|
||||
api.url = flags[i + 1].value;
|
||||
}
|
||||
|
||||
cout<<"url is "<<api.url<<endl;
|
||||
}
|
||||
cout<<"url is "<<api.url<<endl;
|
||||
}
|
||||
|
||||
// TODO: For now I will hard code
|
||||
// the api version since I am only
|
||||
// on version 1
|
||||
api.version = "v1";
|
||||
}
|
||||
#pragma functions
|
||||
// TODO: For now I will hard code
|
||||
// the api version since I am only
|
||||
// on version 1
|
||||
api.version = "v1";
|
||||
}
|
||||
#pragma functions
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user