significance and source of task id

Tara's Avatar

Tara

16 Jan, 2012 04:04 PM via web

In lieu of an API, I'd like to use PHP and cURL with my browsers cookie cache to emulate adding tasks via the browser.

I'm needing to input 60 some tasks and I'd rather do so via a script than my poor hands on a keyboard. In studying the POST that results from creating a task, I find most of it makes sense, but I'm not sure how important the id is (can I successfully submit without one?) or how to create a valid one.

  1. Support Staff 2 Posted by Mitchell Amihod on 16 Jan, 2012 04:39 PM

    Mitchell Amihod's Avatar

    hey tara, you need the id. You need to generate one for new tasks.

    You can examine how its done in the ruby gem https://github.com/meeech/nirv/blob/master/lib/nirvanahq/task.rb#L1... where I prepare the payload, you can see the defaults I set. You could use that to script on the CLI as well.

    Here's a copy of the UUID function nirvana uses (javascript)

    function uuid4() {
      // CREDIT: broofa http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
      return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,
      function(c) {
          var r = Math.random() * 16 | 0,
          v = c == 'x' ? r: (r & 0x3 | 0x8);
          return v.toString(16);
      }).toUpperCase();
    }
    

    hope this helps
    m

  2. 3 Posted by Proximo on 16 Jan, 2012 06:56 PM

    Proximo's Avatar

    I think Programmers are soooooo cool.

    The hieroglyphics posted above mean nothing to someone like me, but I still think it's cool to look at. :-)

    "Yes, the flex capacitor linear output needs to hook with the induction modulator in order to extract the package via. encrypted sets of atomic plasma energy."

    WHAT?

    When you guys are done with creating some cool extensions or web apps, just let me know were to download them and make sure the only option I have is "Next, Next.... OK".

    Let me get back to my 3D Design and Animation work.

  3. 4 Posted by Tara on 16 Jan, 2012 11:43 PM

    Tara's Avatar

    @Mitchell, thanks for the info, i'll get cracking on that

    @proximo, it's all relative. i found myself standing on my head in SketchUp,

  4. Support Staff 5 Posted by Mitchell Amihod on 17 Jan, 2012 12:13 AM

    Mitchell Amihod's Avatar

    @tara coo. hit me up here or on twitter (@meeech) if you have any problems.

    @proximo what tara said! :D

  5. 6 Posted by Proximo on 19 Jan, 2012 05:24 AM

    Proximo's Avatar

    ROFL

    I am trying to learn Java Script, HTML 5 and CSS.

    Not easy for me but I am trying.

    Designing a complex surface model or a large 3D assembly with many components is easy for me. So I guess it is all relative.

Reply to this discussion

Internal reply

Formatting help or Preview

Attached Files

You can attach files up to 10MB

What month comes before July?

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.