There's no automatic way to get your Release ID for an album. Rather, there are many releases for any given album, sometimes more than a hundred. For example, check out Pink Floyd's Dark Side of the Moon:
http://www.discogs.com/Pink-Floyd-The-Dark-Side-Of-The-Moon/master/10362Each of the items there is a Release, and one release may be different from another. While many have essentially the same track lists, each has a different quantity and quality of credits and extra meta-information (release date, label, remastering, etc.), and of course the Catalog #. And some releases have extra tracks, extended versions, and different packaging, and obviously different media formats (CD, SACD, LP, 8-Track, Cassette).
There is the concept of a Master Release, which is a bit of an overarching entry with a track list, year, genre, but little other metadata.
Now, if you wanted a way to, say, return the first 'CD' release, and didn't really care about the other metadata beyond track info, I could have the script query by Artist/Album Name/Format, and just accept the first release found that matches the criteria (and number of tracks probably), and ignore assigning unverified information (Catalog #, Country, Label, Release Date, etc.). Or perhaps the list can be narrowed and more refined with your own good metadata (such as Date, Country, Label, or whatever).
And there can be more problems, for albums where exact title matches are difficult, especially with Greatest Hits albums, where there might be many different "Greatest Hits" masters with entirely different tracks.
So, in summary, with only two pieces of metadata (Artist/Album), results will be less than spectacular. With better metadata, results should theoretically be better. But at some point, if you have perfect metadata, you don't need the script, and I'm not sure where that balance is yet (and we probably don't know until user requests come in).
My approach to this type of stuff is to get the data when I play an album (cover art, extra metadata, lyrics), as it is few second process, for each 60 minutes of playback, roughly. But I'm open to suggestions.
I would suggest you start by trying it out with a test album or two, and see what you need and want, and how well it works for you.