As given in the code, once we call API the output is stored in the profile variable. When I was checking the type of the output using profile.class it was showing the class as #<CrystalSDK::Profile:0x00000000aabce8>. Also when I checked for 'profile.info.class' it was showing the class as RecursiveOpenStruct. But in the documentation of crystal API the output format is given as application/json so how to receive or store the output in the profile in .json format? I tried with various methods but I couldn't figure it out. A small help regarding this will be appreciated.
As given in the code, once we call API the output is stored in the
profilevariable. When I was checking the type of the output usingprofile.classit was showing the class as#<CrystalSDK::Profile:0x00000000aabce8>. Also when I checked for 'profile.info.class' it was showing the class asRecursiveOpenStruct. But in the documentation of crystal API the output format is given asapplication/jsonso how to receive or store the output in theprofilein.jsonformat? I tried with various methods but I couldn't figure it out. A small help regarding this will be appreciated.