Your question is still way too broad to answer. What would you like an 'API or script' to do?
You would create this game in the same way that you would build any other app. Start by designing the UI and app workflows. Think about what data you need. This being a multiplayer app, adds a lot of complexity. It'll probably involve a central server component, for game coordination.
Simply asking for an 'API' to do all this is meaningless. Yes there are libraries you can use to make things easier to develop, but they are focused on different aspects of the required functionality.
I imagine this will be quite heavy on graphical content, but it all depends on how you visualise the UI, and how to represent the card game.
So to start with, you need to do a lot more thinking about the app design.