• Tim Mays
  • NEWBIE
  • 0 Points
  • Member since 2015
  • IT Business Solutions Sr. Developer
  • A.W. Hastings & Co.


  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 1
    Replies
Has anyone tried to use Superagent (https://github.com/visionmedia/superagent" target="_blank) in a lightning web component?
import { LightningElement } from 'lwc';
import { loadScript } from 'lightning/platformResourceLoader';
import superagent from '@salesforce/resourceUrl/superagent';

export default class BodaciousDisputatious extends LightningElement {
    superagentInitialized = false;

    renderedCallback() {
        if (this.superagentInitialized) {
            return;
        }

        Promise.all([
          loadScript(this, superagent) // the static resource is not in an archive 
        ]).then(() => {
            this.superagentInitialized = true;
            this.makeTheCall();
        })
    }

    makeTheCall() {
        superagent
        .get ('https://api.idk.com')
        .then((error, response) => {
            if (error) {
                console.error(error);
            }
            if (response) {
                console.warn(response);
            }
        });
    }
}
All I get is get is not a function. Maybe I just have the Friday burnouts, maybe I need to look at it again after some beverages. But incase that dosn't help do any of you fine folks see anything wrong?

This is the js file I used for the static resource named superagent
https://cdn.jsdelivr.net/npm/superagent@5.0.5/dist/superagent.min.js
I'm looking for a command to create a lightning token bundle. We need something like the way we create a lightning component.
sfdx force:lightning:token:create
This isn't avaialable today, just look at sfdx force:lightning -h. Maybe its coming? For now what is the best way to create a lightning token bundle with sfdx? I'm using the CLI and VS Code with the SF extentions.
 
It has been a few years since I've worked on Salesfoce. But I'm back for more! I was pocking around looking for a new sparkly IDE that might be waiting for me and I'm left with a feeling of confusion. What is going on? I get that Salesforce has/is working hard on the tooling api but who has a solid IDE solution that has professional support and sparkly toys? I know I know, I can just use the Eclipse plugin but you know, its not sparkly.

Cloud9 looks like the perfect solution for salesforce developers. The two cloud geeks are already working together with Heroku so why don't they have a OOTB Cloud9 solution for Salesforce.com development?

Has anyone tried to hook up a salesforce org with Cloud9? If not someone should make that happen. Or maybe I should have a go at it.
I looked at BrainEngine but the sign up page gives an azure 403, for that last week. It didn’t look like BrainEngine had more than one guy supporting it, and not open source. Maybe I’m overlooking something?

Any up dates on whats going on would be helpful.
 
It has been a few years since I've worked on Salesfoce. But I'm back for more! I was pocking around looking for a new sparkly IDE that might be waiting for me and I'm left with a feeling of confusion. What is going on? I get that Salesforce has/is working hard on the tooling api but who has a solid IDE solution that has professional support and sparkly toys? I know I know, I can just use the Eclipse plugin but you know, its not sparkly.

Cloud9 looks like the perfect solution for salesforce developers. The two cloud geeks are already working together with Heroku so why don't they have a OOTB Cloud9 solution for Salesforce.com development?

Has anyone tried to hook up a salesforce org with Cloud9? If not someone should make that happen. Or maybe I should have a go at it.
I looked at BrainEngine but the sign up page gives an azure 403, for that last week. It didn’t look like BrainEngine had more than one guy supporting it, and not open source. Maybe I’m overlooking something?

Any up dates on whats going on would be helpful.
 
Has anyone tried to use Superagent (https://github.com/visionmedia/superagent" target="_blank) in a lightning web component?
import { LightningElement } from 'lwc';
import { loadScript } from 'lightning/platformResourceLoader';
import superagent from '@salesforce/resourceUrl/superagent';

export default class BodaciousDisputatious extends LightningElement {
    superagentInitialized = false;

    renderedCallback() {
        if (this.superagentInitialized) {
            return;
        }

        Promise.all([
          loadScript(this, superagent) // the static resource is not in an archive 
        ]).then(() => {
            this.superagentInitialized = true;
            this.makeTheCall();
        })
    }

    makeTheCall() {
        superagent
        .get ('https://api.idk.com')
        .then((error, response) => {
            if (error) {
                console.error(error);
            }
            if (response) {
                console.warn(response);
            }
        });
    }
}
All I get is get is not a function. Maybe I just have the Friday burnouts, maybe I need to look at it again after some beverages. But incase that dosn't help do any of you fine folks see anything wrong?

This is the js file I used for the static resource named superagent
https://cdn.jsdelivr.net/npm/superagent@5.0.5/dist/superagent.min.js