How to create Magento’s Custom API?

It is not in-depth tutorial but description on how I tackled creation of custom API for magento. There are still vast fields of unknown but at least this will let you start building your own API and let you learn, like me, on how to do it. If I will find out anything new about it or I will gain some theoretical knowledge then I will update this post with those revelations.
Continue reading

Where is Varien_Object?

While battling with the Custom API I tried to locate Varien_Object class, I couldn’t locate it nowhere within the “app” folder, when I looked again at the magento’s root folder I have noticed “lib” folder, bingo, I have found it, also I have found other code used by magento i.e. the image uploader.

Magento API – resources method

Still didn’t gave up on this, following is the update on my progress. I have created in magento 3 types of roles, admin, read only and customer. I wanted to check what is the difference from the API point of view. I have browsed the documentation (rather a brief list then documentation) and have found in Magento Core API the “resources” method.
Continue reading

2nd Post From Flash!

And another sent from flash, I have used the metaWeblog.newPost(string blogid, string username, string password, struct content, bool publish)
Following is the structure passed as a third argument:

<struct>
   <member>
      <name>description</name>
      <value>This Post was generated, from the flash! 🙂 </value>
   </member>
   <member>
      <name>categories</name>
      <value>
         <array>
            <data>
               <value>flash</value>
               <value>xml-rpc</value>
         </data>
      </value>
   </member>
   <member>
      <name>dateCreated</name>
      <value>
         <dateTime.iso8601>20100822T02:50:00</dateTime.iso8601>
      </value>
   </member>
   <member>
      <name>title</name>
      <value>Post From Flash!</value>
   </member>
</struct>