WWW class does not work

First of all. Im new to Unity and im developing in the new Unity 5.0.0. I´ve been looking at the WWW class in Unity documentation and followed through it and havent got it to work yet. I have looked in other questions and googled alot and couldnt get it to work. This is the code I got in my APImanager:

using UnityEngine;
using System.Collections;

public class apiManager : MonoBehaviour

{

public string url = “URL”;

public string temp;

public void Start(){
	WWW w = new WWW (url);
	StartCoroutine (WaitForRequest (w));
	             
}
IEnumerator WaitForRequest(WWW w){
	yield return w;
	temp = w.text.ToString ();
}
public string getTemp(){
	return temp;
}

}

And in my main file where I want to call the string getTemp method and show the data in a label… it doesnt work. Nothing shows up and im struggling to figure it out (Im trying to show the data in the label as a text (string).

public class main : MonoBehaviour

{

apiManager myApiManager = new apiManager();
}

void onGUI

{

GUI.Label(ScreenPosition(0, 500, 300,300), myApiManager.getTemp());

}

Is it something im missing or what? Can you please provide me information on how it should work or if I have missed something?
Thanks.

myApiManager is a MonoBehaviour and should not be instantiated using “new”. Attach it to a GameObject in your scene and connect it to the reference in main.

public class main : MonoBehaviour
{
  public apiManager myApiManager;

  void onGUI
  {
      GUI.Label(ScreenPosition(0, 500, 300,300), myApiManager.getTemp());
  }
}