Can you node.save and apiKey???

Events happening in the community are now at Drupal community events on www.drupal.org.
Fixdit's picture

Simple question, how do I use an apiKey for my node.save service in AS3? My site needs the key to load nodes and would get:" Missing arguments" otherwise, however I'm pulling my hair out trying to find the syntax that would let me include the site's api key in the node.save call. Please, please help!
Many thanks
Node.save service call:

      private function saveGame():void {
         gateway = new RemotingService(gatewayUrl);
         var responder:Responder = new Responder(onResult, onFault);

           var edit:Object = new Object();
            edit.type = "note";
          edit.title = new Array({value:formBubble.title_txt.text});
         edit.body = new Array({value:formBubble.body_txt.text});
           edit.field_xcoord = new Array({value:String(Math.floor(p.x))});
            edit.field_ycoord = new Array({value:String(Math.floor(p.y))});
            edit.field_zcoord = new Array({value:String(Math.floor(p.z))});

           gateway.call("node.save",responder,edit);

       }

Usual service call:

public function main() {
         drupal=new Drupal;
         drupal.gatewayUrl=gatewayUrl;
          drupal.apiKey=apiKey;
          drupal.connect(someFunction);
}

Comments

I've been trying to use the

seutje's picture

I've been trying to use the apiKey for a while as well, but just could find a proper way to send it, so eventually I gave up and stuck to session ID :(

Seutje, I found it!

Fixdit's picture

I will go back and look for the code for you and post it here. Alternativley you could contact me through my Drupal groups account?

I found a snippet somewhere

seutje's picture

I found a snippet somewhere on how to generate a proper hash using the APIkey but it was so huge it just seemed silly

I'll just stick to using SessID, don't rly need hardcore security right now, but I might in the future :p

Services

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: